From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx173.postini.com [74.125.245.173]) by kanga.kvack.org (Postfix) with SMTP id 75F0F6B0027 for ; Thu, 21 Mar 2013 12:25:29 -0400 (EDT) Date: Thu, 21 Mar 2013 12:25:18 -0400 From: Johannes Weiner 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: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Linux-MM , Jiri Slaby , Valdis Kletnieks , Rik van Riel , Zlatko Calusic , dormando , Satoru Moriya , Michal Hocko , LKML 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org