From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755259Ab1AaJDq (ORCPT ); Mon, 31 Jan 2011 04:03:46 -0500 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:43449 "EHLO e23smtp01.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754797Ab1AaJDo (ORCPT ); Mon, 31 Jan 2011 04:03:44 -0500 Date: Mon, 31 Jan 2011 10:07:08 +0530 From: Balbir Singh To: KAMEZAWA Hiroyuki Cc: Christoph Lameter , Minchan Kim , linux-mm@kvack.org, akpm@linux-foundation.org, npiggin@kernel.dk, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kosaki.motohiro@jp.fujitsu.com Subject: Re: [PATCH 3/3] Provide control over unmapped pages (v4) Message-ID: <20110131043708.GF5054@balbir.in.ibm.com> Reply-To: balbir@linux.vnet.ibm.com References: <20110125051003.13762.35120.stgit@localhost6.localdomain6> <20110125051015.13762.13429.stgit@localhost6.localdomain6> <20110128064851.GB5054@balbir.in.ibm.com> <20110128165605.3cbe5208.kamezawa.hiroyu@jp.fujitsu.com> <20110131085853.b09aef2d.kamezawa.hiroyu@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20110131085853.b09aef2d.kamezawa.hiroyu@jp.fujitsu.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * KAMEZAWA Hiroyuki [2011-01-31 08:58:53]: > On Fri, 28 Jan 2011 09:20:02 -0600 (CST) > Christoph Lameter wrote: > > > On Fri, 28 Jan 2011, KAMEZAWA Hiroyuki wrote: > > > > > > > I see it as a tradeoff of when to check? add_to_page_cache or when we > > > > > are want more free memory (due to allocation). It is OK to wakeup > > > > > kswapd while allocating memory, somehow for this purpose (global page > > > > > cache), add_to_page_cache or add_to_page_cache_locked does not seem > > > > > the right place to hook into. I'd be open to comments/suggestions > > > > > though from others as well. > > > > > > I don't like add hook here. > > > AND I don't want to run kswapd because 'kswapd' has been a sign as > > > there are memory shortage. (reusing code is ok.) > > > > > > How about adding new daemon ? Recently, khugepaged, ksmd works for > > > managing memory. Adding one more daemon for special purpose is not > > > very bad, I think. Then, you can do > > > - wake up without hook > > > - throttle its work. > > > - balance the whole system rather than zone. > > > I think per-node balance is enough... > > > > > > I think we already have enough kernel daemons floating around. They are > > multiplying in an amazing way. What would be useful is to map all > > the memory management background stuff into a process. May call this memd > > instead? Perhaps we can fold khugepaged into kswapd as well etc. > > > > Making kswapd slow for whis "additional", "requested by user, not by system" > work is good thing ? I think workqueue works enough well, it's scale based on > workloads, if using thread is bad. > Making it slow is a generic statement, kswapd is supposed to do background reclaim, in this case a special request for unmapped pages, specifically and deliberately requested by the admin via a boot option. -- Three Cheers, Balbir From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balbir Singh Subject: Re: [PATCH 3/3] Provide control over unmapped pages (v4) Date: Mon, 31 Jan 2011 10:07:08 +0530 Message-ID: <20110131043708.GF5054@balbir.in.ibm.com> References: <20110125051003.13762.35120.stgit@localhost6.localdomain6> <20110125051015.13762.13429.stgit@localhost6.localdomain6> <20110128064851.GB5054@balbir.in.ibm.com> <20110128165605.3cbe5208.kamezawa.hiroyu@jp.fujitsu.com> <20110131085853.b09aef2d.kamezawa.hiroyu@jp.fujitsu.com> Reply-To: balbir@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: Christoph Lameter , Minchan Kim , linux-mm@kvack.org, akpm@linux-foundation.org, npiggin@kernel.dk, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kosaki.motohiro@jp.fujitsu.com To: KAMEZAWA Hiroyuki Return-path: Content-Disposition: inline In-Reply-To: <20110131085853.b09aef2d.kamezawa.hiroyu@jp.fujitsu.com> Sender: owner-linux-mm@kvack.org List-Id: kvm.vger.kernel.org * KAMEZAWA Hiroyuki [2011-01-31 08:58:53]: > On Fri, 28 Jan 2011 09:20:02 -0600 (CST) > Christoph Lameter wrote: > > > On Fri, 28 Jan 2011, KAMEZAWA Hiroyuki wrote: > > > > > > > I see it as a tradeoff of when to check? add_to_page_cache or when we > > > > > are want more free memory (due to allocation). It is OK to wakeup > > > > > kswapd while allocating memory, somehow for this purpose (global page > > > > > cache), add_to_page_cache or add_to_page_cache_locked does not seem > > > > > the right place to hook into. I'd be open to comments/suggestions > > > > > though from others as well. > > > > > > I don't like add hook here. > > > AND I don't want to run kswapd because 'kswapd' has been a sign as > > > there are memory shortage. (reusing code is ok.) > > > > > > How about adding new daemon ? Recently, khugepaged, ksmd works for > > > managing memory. Adding one more daemon for special purpose is not > > > very bad, I think. Then, you can do > > > - wake up without hook > > > - throttle its work. > > > - balance the whole system rather than zone. > > > I think per-node balance is enough... > > > > > > I think we already have enough kernel daemons floating around. They are > > multiplying in an amazing way. What would be useful is to map all > > the memory management background stuff into a process. May call this memd > > instead? Perhaps we can fold khugepaged into kswapd as well etc. > > > > Making kswapd slow for whis "additional", "requested by user, not by system" > work is good thing ? I think workqueue works enough well, it's scale based on > workloads, if using thread is bad. > Making it slow is a generic statement, kswapd is supposed to do background reclaim, in this case a special request for unmapped pages, specifically and deliberately requested by the admin via a boot option. -- Three Cheers, Balbir -- 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 policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org