Re: [PATCH] mm: page_alloc: Fix setting of ZONE_FAIR_DEPLETED on UP v2

2014-09-10 Thread Johannes Weiner
On Wed, Sep 10, 2014 at 10:16:03AM +0100, Mel Gorman wrote: > On Tue, Sep 09, 2014 at 12:53:18PM -0700, Andrew Morton wrote: > > On Mon, 8 Sep 2014 12:57:18 +0100 Mel Gorman wrote: > > > > > zone_page_state is an API hazard because of the difference in behaviour > > > between SMP and UP is very s

Re: [PATCH] mm: page_alloc: Fix setting of ZONE_FAIR_DEPLETED on UP v2

2014-09-10 Thread Mel Gorman
On Tue, Sep 09, 2014 at 12:53:18PM -0700, Andrew Morton wrote: > On Mon, 8 Sep 2014 12:57:18 +0100 Mel Gorman wrote: > > > zone_page_state is an API hazard because of the difference in behaviour > > between SMP and UP is very surprising. There is a good reason to allow > > NR_ALLOC_BATCH to go ne

Re: [PATCH] mm: page_alloc: Fix setting of ZONE_FAIR_DEPLETED on UP v2

2014-09-09 Thread Andrew Morton
On Mon, 8 Sep 2014 12:57:18 +0100 Mel Gorman wrote: > zone_page_state is an API hazard because of the difference in behaviour > between SMP and UP is very surprising. There is a good reason to allow > NR_ALLOC_BATCH to go negative -- when the counter is reset the negative > value takes recent act

[PATCH] mm: page_alloc: Fix setting of ZONE_FAIR_DEPLETED on UP v2

2014-09-08 Thread Mel Gorman
Commit 4ffeaf35 (mm: page_alloc: reduce cost of the fair zone allocation policy) arguably broke the fair zone allocation policy on UP with these hunks. a/mm/page_alloc.c b/mm/page_alloc.c @@ -1612,6 +1612,9 @@ again: } __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order)); +