lkml.org 
[lkml]   [2018]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2018-05-16 14:00    [W:0.138 / U:1.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site