From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx191.postini.com [74.125.245.191]) by kanga.kvack.org (Postfix) with SMTP id A5DEA6B0092 for ; Thu, 17 May 2012 05:23:25 -0400 (EDT) Date: Thu, 17 May 2012 02:24:12 -0700 From: Andrew Morton Subject: Re: [PATCH] mm: consider all swapped back pages in used-once logic Message-Id: <20120517022412.9175f604.akpm@linux-foundation.org> In-Reply-To: <1337246033-13719-1-git-send-email-mhocko@suse.cz> References: <1337246033-13719-1-git-send-email-mhocko@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , Rik van Riel On Thu, 17 May 2012 11:13:53 +0200 Michal Hocko wrote: > [64574746 vmscan: detect mapped file pages used only once] made mapped pages > have another round in inactive list because they might be just short > lived and so we could consider them again next time. This heuristic > helps to reduce pressure on the active list with a streaming IO > worklods. > This patch fixes a regression introduced by this commit for heavy shmem A performance regression, specifically. Are you able to quantify it? > based workloads because unlike Anon pages, which are excluded from this > heuristic because they are usually long lived, shmem pages are handled > as a regular page cache. > This doesn't work quite well, unfortunately, if the workload is mostly > backed by shmem (in memory database sitting on 80% of memory) with a > streaming IO in the background (backup - up to 20% of memory). Anon > inactive list is full of (dirty) shmem pages when watermarks are > hit. Shmem pages are kept in the inactive list (they are referenced) > in the first round and it is hard to reclaim anything else so we reach > lower scanning priorities very quickly which leads to an excessive swap > out. > > Let's fix this by excluding all swap backed pages (they tend to be long > lived wrt. the regular page cache anyway) from used-once heuristic and > rather activate them if they are referenced. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org