Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key

2016-02-06 Thread Ingo Molnar
* Davidlohr Bueso wrote: > On Fri, 05 Feb 2016, Ingo Molnar wrote: > > >So I too didn't understand that sentence at first, because the capitalization > >really throws off quick parsing of that comment, as 'MB' ususally denotes > >megabytes. > > Sure, fair enough. > > > > >So please change it

Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key

2016-02-05 Thread Davidlohr Bueso
On Fri, 05 Feb 2016, Ingo Molnar wrote: So I too didn't understand that sentence at first, because the capitalization really throws off quick parsing of that comment, as 'MB' ususally denotes megabytes. Sure, fair enough. So please change it to "mb(); (A)" or so - and I think all of these c

Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key

2016-02-05 Thread Ingo Molnar
* Thomas Gleixner wrote: > On Thu, 4 Feb 2016, Davidlohr Bueso wrote: > > > On Thu, 04 Feb 2016, Thomas Gleixner wrote: > > > > > On Wed, 3 Feb 2016, Davidlohr Bueso wrote: > > > > +* We are not calling into get_futex_key_refs() in > > > > file-backed > > > > +

Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key

2016-02-04 Thread Thomas Gleixner
On Thu, 4 Feb 2016, Davidlohr Bueso wrote: > On Thu, 04 Feb 2016, Thomas Gleixner wrote: > > > On Wed, 3 Feb 2016, Davidlohr Bueso wrote: > > > + * We are not calling into get_futex_key_refs() in file-backed > > > + * cases, therefore a successful atomic_inc return below will >

Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key

2016-02-04 Thread Davidlohr Bueso
On Thu, 04 Feb 2016, Thomas Gleixner wrote: On Wed, 3 Feb 2016, Davidlohr Bueso wrote: +* We are not calling into get_futex_key_refs() in file-backed +* cases, therefore a successful atomic_inc return below will +* guarantee that get_futex_key() w

Re: [PATCH v5] futex: Remove requirement for lock_page in get_futex_key

2016-02-04 Thread Thomas Gleixner
On Wed, 3 Feb 2016, Davidlohr Bueso wrote: > + * We are not calling into get_futex_key_refs() in file-backed > + * cases, therefore a successful atomic_inc return below will > + * guarantee that get_futex_key() will continue to imply MB (B). Can you please ma

[PATCH v5] futex: Remove requirement for lock_page in get_futex_key

2016-02-03 Thread Davidlohr Bueso
From: Davidlohr Bueso From: Mel Gorman When dealing with key handling for shared futexes, we can drastically reduce the usage/need of the page lock. 1) For anonymous pages, the associated futex object is the mm_struct which does not require the page lock. 2) For inode based, keys, we can check