Re: [rt-tests PATCH v2] queuelat: use mfence for rdtsc ordering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 7 Jan 2019, Marcelo Tosatti wrote:

> 
> cpuid is causing register corruption: use mfence instead.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
> 
> v2: fix signed-off-by line
> 
> diff --git a/src/queuelat/queuelat.c b/src/queuelat/queuelat.c
> index 2230d04..3b291f1 100644
> --- a/src/queuelat/queuelat.c
> +++ b/src/queuelat/queuelat.c
> @@ -265,7 +265,7 @@ static inline unsigned long long __rdtscll(void)
>  {
>          DECLARE_ARGS(val, low, high);
>  
> -        asm volatile("cpuid; rdtsc" : EAX_EDX_RET(val, low, high));
> +        asm volatile("mfence; rdtsc" : EAX_EDX_RET(val, low, high));
>  
>          return EAX_EDX_VAL(val, low, high);
>  }
> 

Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux