Messages in this thread | | | Date | Wed, 16 May 2018 13:59:06 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v4 1/2] locking/rwsem: Add a new RWSEM_ANONYMOUSLY_OWNED flag |
| |
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.
| |