Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
On Thu, May 22, 2014 at 05:04:51PM +0200, Peter Zijlstra wrote: > On Thu, May 22, 2014 at 03:40:45PM +0100, Mel Gorman wrote: > > > > +static bool __wake_up_common(wait_queue_head_t *q, unsigned int mode, > > > int nr_exclusive, int wake_flags, void *key) > > > { > > >

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Peter Zijlstra
On Thu, May 22, 2014 at 03:40:45PM +0100, Mel Gorman wrote: > > +static bool __wake_up_common(wait_queue_head_t *q, unsigned int mode, > > int nr_exclusive, int wake_flags, void *key) > > { > > wait_queue_t *curr, *next; > > + bool woke = false; > > > >

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
On Thu, May 22, 2014 at 12:56:38PM +0200, Peter Zijlstra wrote: > On Thu, May 22, 2014 at 11:40:51AM +0100, Mel Gorman wrote: > > +void __wake_up_page_bit(wait_queue_head_t *wqh, struct page *page, void > > *word, int bit) > > +{ > > + struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word,

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
On Thu, May 22, 2014 at 12:56:38PM +0200, Peter Zijlstra wrote: > On Thu, May 22, 2014 at 11:40:51AM +0100, Mel Gorman wrote: > > +void __wake_up_page_bit(wait_queue_head_t *wqh, struct page *page, void > > *word, int bit) > > +{ > > + struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word,

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Peter Zijlstra
On Thu, May 22, 2014 at 11:40:51AM +0100, Mel Gorman wrote: > +void __wake_up_page_bit(wait_queue_head_t *wqh, struct page *page, void > *word, int bit) > +{ > + struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit); > + unsigned long flags; > + > + /* If there is no

[PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
Changelog since v6 o Optimisation when PG_waiters is not available (peterz) o Documentation Changelog since v5 o __always_inline where appropriate (peterz) o Documentation (akpm) Changelog since v4 o Remove dependency on io_schedule_timeout o Push

[PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
Changelog since v6 o Optimisation when PG_waiters is not available (peterz) o Documentation Changelog since v5 o __always_inline where appropriate (peterz) o Documentation (akpm) Changelog since v4 o Remove dependency on io_schedule_timeout o Push

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Peter Zijlstra
On Thu, May 22, 2014 at 11:40:51AM +0100, Mel Gorman wrote: +void __wake_up_page_bit(wait_queue_head_t *wqh, struct page *page, void *word, int bit) +{ + struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit); + unsigned long flags; + + /* If there is no PG_waiters

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
On Thu, May 22, 2014 at 12:56:38PM +0200, Peter Zijlstra wrote: On Thu, May 22, 2014 at 11:40:51AM +0100, Mel Gorman wrote: +void __wake_up_page_bit(wait_queue_head_t *wqh, struct page *page, void *word, int bit) +{ + struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit); +

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
On Thu, May 22, 2014 at 12:56:38PM +0200, Peter Zijlstra wrote: On Thu, May 22, 2014 at 11:40:51AM +0100, Mel Gorman wrote: +void __wake_up_page_bit(wait_queue_head_t *wqh, struct page *page, void *word, int bit) +{ + struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit); +

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Peter Zijlstra
On Thu, May 22, 2014 at 03:40:45PM +0100, Mel Gorman wrote: +static bool __wake_up_common(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, int wake_flags, void *key) { wait_queue_t *curr, *next; + bool woke = false;

Re: [PATCH] mm: filemap: Avoid unnecessary barriers and waitqueue lookups in unlock_page fastpath v7

2014-05-22 Thread Mel Gorman
On Thu, May 22, 2014 at 05:04:51PM +0200, Peter Zijlstra wrote: On Thu, May 22, 2014 at 03:40:45PM +0100, Mel Gorman wrote: +static bool __wake_up_common(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, int wake_flags, void *key) { wait_queue_t *curr,