From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756912Ab1F2UB0 (ORCPT ); Wed, 29 Jun 2011 16:01:26 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:42716 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753492Ab1F2UBX (ORCPT ); Wed, 29 Jun 2011 16:01:23 -0400 Date: Wed, 29 Jun 2011 13:00:43 -0700 From: Andrew Morton To: KAMEZAWA Hiroyuki Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "nishimura@mxp.nes.nec.co.jp" , "bsingharora@gmail.com" , Michal Hocko , Ying Han Subject: Re: [PATCH] [Cleanup] memcg: export memory cgroup's swappiness v2 Message-Id: <20110629130043.4dc47249.akpm@linux-foundation.org> In-Reply-To: <20110629190325.28aa2dc6.kamezawa.hiroyu@jp.fujitsu.com> References: <20110629190325.28aa2dc6.kamezawa.hiroyu@jp.fujitsu.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Jun 2011 19:03:25 +0900 KAMEZAWA Hiroyuki wrote: > Each memory cgroup has 'swappiness' value and it can be accessed by > get_swappiness(memcg). The major user is try_to_free_mem_cgroup_pages() > and swappiness is passed by argument. It's propagated by scan_control. > > get_swappiness is static function but some planned updates will need to > get swappiness from files other than memcontrol.c > This patch exports get_swappiness() as mem_cgroup_swappiness(). > By this, we can remove the argument of swapiness from try_to_free... > and drop swappiness from scan_control. only memcg uses it. > > +extern unsigned int mem_cgroup_swappiness(struct mem_cgroup *mem); > +unsigned int mem_cgroup_swappiness(struct mem_cgroup *memcg) > +static int vmscan_swappiness(struct scan_control *sc) The patch seems a bit confused about the signedness of swappiness. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by kanga.kvack.org (Postfix) with ESMTP id 665FD6B00ED for ; Wed, 29 Jun 2011 16:01:18 -0400 (EDT) Date: Wed, 29 Jun 2011 13:00:43 -0700 From: Andrew Morton Subject: Re: [PATCH] [Cleanup] memcg: export memory cgroup's swappiness v2 Message-Id: <20110629130043.4dc47249.akpm@linux-foundation.org> In-Reply-To: <20110629190325.28aa2dc6.kamezawa.hiroyu@jp.fujitsu.com> References: <20110629190325.28aa2dc6.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: KAMEZAWA Hiroyuki Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "nishimura@mxp.nes.nec.co.jp" , "bsingharora@gmail.com" , Michal Hocko , Ying Han On Wed, 29 Jun 2011 19:03:25 +0900 KAMEZAWA Hiroyuki wrote: > Each memory cgroup has 'swappiness' value and it can be accessed by > get_swappiness(memcg). The major user is try_to_free_mem_cgroup_pages() > and swappiness is passed by argument. It's propagated by scan_control. > > get_swappiness is static function but some planned updates will need to > get swappiness from files other than memcontrol.c > This patch exports get_swappiness() as mem_cgroup_swappiness(). > By this, we can remove the argument of swapiness from try_to_free... > and drop swappiness from scan_control. only memcg uses it. > > +extern unsigned int mem_cgroup_swappiness(struct mem_cgroup *mem); > +unsigned int mem_cgroup_swappiness(struct mem_cgroup *memcg) > +static int vmscan_swappiness(struct scan_control *sc) The patch seems a bit confused about the signedness of swappiness. -- 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