Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933734Ab3CUQ0R (ORCPT ); Thu, 21 Mar 2013 12:26:17 -0400 Received: from zene.cmpxchg.org ([85.214.230.12]:41728 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755484Ab3CUQ0Q (ORCPT ); Thu, 21 Mar 2013 12:26:16 -0400 Date: Thu, 21 Mar 2013 12:25:18 -0400 From: Johannes Weiner To: Mel Gorman Cc: Linux-MM , Jiri Slaby , Valdis Kletnieks , Rik van Riel , Zlatko Calusic , dormando , Satoru Moriya , Michal Hocko , LKML Subject: Re: [PATCH 02/10] mm: vmscan: Obey proportional scanning requirements for kswapd Message-ID: <20130321162518.GB27848@cmpxchg.org> References: <1363525456-10448-1-git-send-email-mgorman@suse.de> <1363525456-10448-3-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1363525456-10448-3-git-send-email-mgorman@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1394 Lines: 26 On Sun, Mar 17, 2013 at 01:04:08PM +0000, Mel Gorman wrote: > Simplistically, the anon and file LRU lists are scanned proportionally > depending on the value of vm.swappiness although there are other factors > taken into account by get_scan_count(). The patch "mm: vmscan: Limit > the number of pages kswapd reclaims" limits the number of pages kswapd > reclaims but it breaks this proportional scanning and may evenly shrink > anon/file LRUs regardless of vm.swappiness. > > This patch preserves the proportional scanning and reclaim. It does mean > that kswapd will reclaim more than requested but the number of pages will > be related to the high watermark. Swappiness is about page types, but this implementation compares all LRUs against each other, and I'm not convinced that this makes sense as there is no guaranteed balance between the inactive and active lists. For example, the active file LRU could get knocked out when it's almost empty while the inactive file LRU has more easy cache than the anon lists combined. Would it be better to compare the sum of file pages with the sum of anon pages and then knock out the smaller pair? -- 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/