Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-09-02 Thread Johannes Weiner
On Mon, Aug 11, 2014 at 02:34:05PM +0200, Vlastimil Babka wrote: > On 08/11/2014 02:12 PM, Mel Gorman wrote: > >On Fri, Aug 08, 2014 at 05:27:15PM +0200, Vlastimil Babka wrote: > >>On 07/09/2014 10:13 AM, Mel Gorman wrote: > >>>--- a/mm/page_alloc.c > >>>+++ b/mm/page_alloc.c > >>>@@ -1604,6

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-09-02 Thread Johannes Weiner
On Mon, Aug 11, 2014 at 02:34:05PM +0200, Vlastimil Babka wrote: On 08/11/2014 02:12 PM, Mel Gorman wrote: On Fri, Aug 08, 2014 at 05:27:15PM +0200, Vlastimil Babka wrote: On 07/09/2014 10:13 AM, Mel Gorman wrote: --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1604,6 +1604,9 @@ again: }

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-08-11 Thread Vlastimil Babka
On 08/11/2014 02:12 PM, Mel Gorman wrote: On Fri, Aug 08, 2014 at 05:27:15PM +0200, Vlastimil Babka wrote: On 07/09/2014 10:13 AM, Mel Gorman wrote: --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1604,6 +1604,9 @@ again: } __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 <<

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-08-11 Thread Mel Gorman
On Fri, Aug 08, 2014 at 05:27:15PM +0200, Vlastimil Babka wrote: > On 07/09/2014 10:13 AM, Mel Gorman wrote: > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -1604,6 +1604,9 @@ again: > > } > > > > __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order)); > > This can

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-08-11 Thread Mel Gorman
On Fri, Aug 08, 2014 at 05:27:15PM +0200, Vlastimil Babka wrote: On 07/09/2014 10:13 AM, Mel Gorman wrote: --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1604,6 +1604,9 @@ again: } __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 order)); This can underflow zero, right?

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-08-11 Thread Vlastimil Babka
On 08/11/2014 02:12 PM, Mel Gorman wrote: On Fri, Aug 08, 2014 at 05:27:15PM +0200, Vlastimil Babka wrote: On 07/09/2014 10:13 AM, Mel Gorman wrote: --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1604,6 +1604,9 @@ again: } __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-08-08 Thread Vlastimil Babka
On 07/09/2014 10:13 AM, Mel Gorman wrote: > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1604,6 +1604,9 @@ again: > } > > __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order)); This can underflow zero, right? > + if (zone_page_state(zone, NR_ALLOC_BATCH) == 0 &&

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-08-08 Thread Vlastimil Babka
On 07/09/2014 10:13 AM, Mel Gorman wrote: --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1604,6 +1604,9 @@ again: } __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 order)); This can underflow zero, right? + if (zone_page_state(zone, NR_ALLOC_BATCH) == 0 AFAICS,

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-07-10 Thread Johannes Weiner
On Wed, Jul 09, 2014 at 09:13:08AM +0100, Mel Gorman wrote: > The fair zone allocation policy round-robins allocations between zones > within a node to avoid age inversion problems during reclaim. If the > first allocation fails, the batch counts is reset and a second attempt > made before

Re: [PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-07-10 Thread Johannes Weiner
On Wed, Jul 09, 2014 at 09:13:08AM +0100, Mel Gorman wrote: The fair zone allocation policy round-robins allocations between zones within a node to avoid age inversion problems during reclaim. If the first allocation fails, the batch counts is reset and a second attempt made before entering

[PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-07-09 Thread Mel Gorman
The fair zone allocation policy round-robins allocations between zones within a node to avoid age inversion problems during reclaim. If the first allocation fails, the batch counts is reset and a second attempt made before entering the slow path. One assumption made with this scheme is that

[PATCH 6/6] mm: page_alloc: Reduce cost of the fair zone allocation policy

2014-07-09 Thread Mel Gorman
The fair zone allocation policy round-robins allocations between zones within a node to avoid age inversion problems during reclaim. If the first allocation fails, the batch counts is reset and a second attempt made before entering the slow path. One assumption made with this scheme is that