Re: [PATCH 08/27] mm, vmscan: Simplify the logic deciding whether kswapd sleeps

2016-06-22 Thread Vlastimil Babka
On 06/21/2016 04:15 PM, Mel Gorman wrote: kswapd goes through some complex steps trying to figure out if it should stay awake based on the classzone_idx and the requested order. It is unnecessarily complex and passes in an invalid classzone_idx to balance_pgdat(). What matters most of all is whe

Re: [PATCH 08/27] mm, vmscan: Simplify the logic deciding whether kswapd sleeps

2016-06-16 Thread Mel Gorman
On Thu, Jun 16, 2016 at 09:30:33AM +0100, Mel Gorman wrote: > > >@@ -2727,7 +2727,7 @@ static bool pfmemalloc_watermark_ok(pg_data_t *pgdat) > > > > > > /* kswapd must be awake if processes are being throttled */ > > > if (!wmark_ok && waitqueue_active(&pgdat->kswapd_wait)) { > > >- pg

Re: [PATCH 08/27] mm, vmscan: Simplify the logic deciding whether kswapd sleeps

2016-06-16 Thread Mel Gorman
On Wed, Jun 15, 2016 at 05:18:00PM +0200, Vlastimil Babka wrote: > >@@ -1209,9 +1209,10 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 > >start) > > > > arch_refresh_nodedata(nid, pgdat); > > } else { > >-/* Reset the nr_zones and classzone_idx to 0 before reu

Re: [PATCH 08/27] mm, vmscan: Simplify the logic deciding whether kswapd sleeps

2016-06-15 Thread Vlastimil Babka
On 06/09/2016 08:04 PM, Mel Gorman wrote: kswapd goes through some complex steps trying to figure out if it should stay awake based on the classzone_idx and the requested order. It is unnecessarily complex and passes in an invalid classzone_idx to balance_pgdat(). What matters most of all is whe