Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752510AbbKYL27 (ORCPT ); Wed, 25 Nov 2015 06:28:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:57939 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751824AbbKYL26 (ORCPT ); Wed, 25 Nov 2015 06:28:58 -0500 Date: Wed, 25 Nov 2015 11:28:51 +0000 From: Mel Gorman To: Yaowei Bai Cc: akpm@linux-foundation.org, riel@redhat.com, mhocko@suse.cz, hannes@cmpxchg.org, kamezawa.hiroyu@jp.fujitsu.com, jslaby@suse.cz, Valdis.Kletnieks@vt.edu, zcalusic@bitsync.net, vbabka@suse.cz, vdavydov@parallels.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: vmscan: Obey indeed proportional scanning for kswapd and memcg Message-ID: <20151125112851.GP19677@suse.de> References: <1448426900-2907-1-git-send-email-baiyaowei@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1448426900-2907-1-git-send-email-baiyaowei@cmss.chinamobile.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1829 Lines: 41 On Wed, Nov 25, 2015 at 12:48:20PM +0800, Yaowei Bai wrote: > Commit e82e0561dae9f3ae5 ("mm: vmscan: obey proportional scanning > requirements for kswapd") intended to preserve the proportional scanning > and reclaim what was requested by get_scan_count() for kswapd and memcg > by stopping reclaiming one type(anon or file) LRU and reducing the other's > amount of scanning proportional to the original scan target. > > So the way to determine which LRU should be stopped reclaiming should be > comparing scanned/unscanned percentages to the original scan target of two > lru types instead of absolute values what implemented currently, because > larger absolute value doesn't mean larger percentage, there shall be > chance that larger absolute value with smaller percentage, for instance: > > target_file = 1000 > target_anon = 500 > nr_file = 500 > nr_anon = 400 > > in this case, because nr_file > nr_anon, according to current implement, > we will stop scanning anon lru and shrink file lru. This breaks > proportional scanning intent and makes more unproportional. > > This patch changes to compare percentage to the original scan target to > determine which lru should be shrunk. > > Signed-off-by: Yaowei Bai This one has gone back and forth a few times in the past. It really was deliberate that the scanning was proportional to the scan target. While I see what your concern is, it's unclear what the actual impact is. Have you done any testing to check if the proposed new behaviour is actually better? -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/