Re: [PATCH v4 1/2] locking/rwsem: Add a new RWSEM_ANONYMOUSLY_OWNED flag

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

 



On Wed, May 16, 2018 at 12:48:30PM +0200, Oleg Nesterov wrote:
> > +static inline bool is_rwsem_owner_spinnable(struct task_struct *owner)
> >  {
> > -	return owner && owner != RWSEM_READER_OWNED;
> > +	return !((unsigned long)owner & RWSEM_ANONYMOUSLY_OWNED);
> >  }
> 
> Perhaps you should add __attribute__(aligned) to struct rw_semaphore then...
> 
> I don't think it is really needed, but see the comment under struct address_space.

Luckily we just dropped CRIS support, but yeah, who knows if some other
dodgy arch also doesn't properly align things.

>From a quick test, m68k is the only odd one, it seems to align pointers
on 2 bytes.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux