From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754159AbcGLOFY (ORCPT ); Tue, 12 Jul 2016 10:05:24 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:51688 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbcGLOFW (ORCPT ); Tue, 12 Jul 2016 10:05:22 -0400 Date: Tue, 12 Jul 2016 10:05:04 -0400 From: Johannes Weiner To: Mel Gorman Cc: Andrew Morton , Linux-MM , Rik van Riel , Vlastimil Babka , Minchan Kim , Joonsoo Kim , LKML Subject: Re: [PATCH 06/34] mm, vmscan: have kswapd only scan based on the highest requested zone Message-ID: <20160712140504.GC5881@cmpxchg.org> References: <1467970510-21195-1-git-send-email-mgorman@techsingularity.net> <1467970510-21195-7-git-send-email-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467970510-21195-7-git-send-email-mgorman@techsingularity.net> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 08, 2016 at 10:34:42AM +0100, Mel Gorman wrote: > kswapd checks all eligible zones to see if they need balancing even if it > was woken for a lower zone. This made sense when we reclaimed on a > per-zone basis because we wanted to shrink zones fairly so avoid > age-inversion problems. Ideally this is completely unnecessary when > reclaiming on a per-node basis. In theory, there may still be anomalies > when all requests are for lower zones and very old pages are preserved in > higher zones but this should be the exceptional case. > > Signed-off-by: Mel Gorman > Acked-by: Vlastimil Babka Acked-by: Johannes Weiner I wasn't quite sure at first what the rationale is for this patch, since it probably won't make much difference in pratice. But I do agree that the code is cleaner to have kswapd check exactly what it was asked to check, rather than some do-the-"right"-thing magic. A hypothetical onslaught of low-zone allocations will wreak havoc to the page age in higher zones anyway, right? So I don't think that case matters all that much.