Re: [RFC PATCH 00/16] Remove unused arch_*_relax operations from spinlocks

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

 



On Mon, 24 Jun 2013 12:58:25 +0100
Will Deacon <will.deacon@xxxxxxx> wrote:

> On Fri, Jun 21, 2013 at 06:17:21PM +0100, Will Deacon wrote:
> > This is an RFC cleanup series removing the unused
> > arch_{spin,read,write}_relax macros from (nearly) all architectures that
> > define them. The macros have no users in core code and are typically
> > synonymous with cpu_relax(), the notable exceptions being PowerPC (where
> > the thing is still unused) and S390.
> 
> So the `no users in core code' part isn't quite true...
> 
> With GENERIC_LOCKBREAK (arm64, ia64, m32r, parisc, powerpc, s390, sh and
> sparc), we can actually spit out arch_*_relax calls in kernel/spinlock.c
> using some macro concatenation that defeated my grep-fu.
> 
> This only makes a difference on powerpc and s390, so we could either:
> 
>   (1) conditionally define the relax macros as cpu_relax in spinlock.c (so
>       the two guys above can have their special versions)
> 
>   (2) Replace the calls with calls to cpu_relax() (although powerpc seems to
>       want to know who owns the lock in order to relax)
> 
>   (3) Leave the current code alone for architectures that may select
>       GENERIC_LOCKBREAK
> 
> Any other ideas/preferences?

Yeah, we never came around to implement arch_read/write_relax. We can remove
the two defines for s390, if we want to add some logic there we can just re-add
an appropriate definition. As powerpc is optimizing their read/write locks
with GENERIC_LOCKBREAK=y we should leave the ability to override the relax
function as it is, no?

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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