RE: [PATCH] lockref: stop doing cpu_relax in the cmpxchg loop

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

 



> diff --git a/lib/lockref.c b/lib/lockref.c
> index 45e93ece8ba0..2afe4c5d8919 100644
> --- a/lib/lockref.c
> +++ b/lib/lockref.c
> @@ -23,7 +23,6 @@
>               }                                                               \
>               if (!--retry)                                                   \
>                       break;                                                  \
> -             cpu_relax();                                                    \
>       }                                                                       \
>  } while (0)

The computer necrophiliacs at Debian and Gentoo seem determined
to keep ia64 alive.

So perhaps this should s/cpu_relax/soemt_relax/ where soemt_relax
is a no-op everywhere except ia64, which can define it as cpu_relax.

The ia64 case is quite painful if one thread on a core is spinning in that
loop, while the other thread on the same core is the one that needs to
run to update that value so that the cmpxchg can succeed.

-Tony




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux