From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx187.postini.com [74.125.245.187]) by kanga.kvack.org (Postfix) with SMTP id 527178D0002 for ; Tue, 29 Jan 2013 10:18:01 -0500 (EST) Message-ID: <5107E81F.4000004@oracle.com> Date: Tue, 29 Jan 2013 23:17:51 +0800 From: Jeff Liu MIME-Version: 1.0 Subject: Re: [PATCH v2 4/6] memcg: export nr_swap_files References: <510658E3.1020306@oracle.com> <510658F6.4010504@oracle.com> <20130129143139.GF29574@dhcp22.suse.cz> In-Reply-To: <20130129143139.GF29574@dhcp22.suse.cz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Glauber Costa , cgroups@vger.kernel.org On 01/29/2013 10:31 PM, Michal Hocko wrote: > On Mon 28-01-13 18:54:46, Jeff Liu wrote: >> Export nr_swap_files which would be used for initializing and destorying >> swap cgroup structures in the coming patch. >> >> Signed-off-by: Jie Liu >> CC: Glauber Costa >> CC: Michal Hocko >> CC: Kamezawa Hiroyuki >> CC: Johannes Weiner >> CC: Mel Gorman >> CC: Andrew Morton >> CC: Sha Zhengju > > You are missing definition for !CONFIG_SWAP Yep, I missed "#define nr_swapfiles 0U" in this case. Thanks, -Jeff > > After this is fixed you can add my > Acked-by: Michal Hocko > >> >> --- >> include/linux/swap.h | 1 + >> mm/swapfile.c | 2 +- >> 2 files changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/include/linux/swap.h b/include/linux/swap.h >> index 68df9c1..6de44c9 100644 >> --- a/include/linux/swap.h >> +++ b/include/linux/swap.h >> @@ -348,6 +348,7 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t, >> /* linux/mm/swapfile.c */ >> extern long nr_swap_pages; >> extern long total_swap_pages; >> +extern unsigned int nr_swapfiles; >> extern void si_swapinfo(struct sysinfo *); >> extern swp_entry_t get_swap_page(void); >> extern swp_entry_t get_swap_page_of_type(int); >> diff --git a/mm/swapfile.c b/mm/swapfile.c >> index e97a0e5..89cebcf 100644 >> --- a/mm/swapfile.c >> +++ b/mm/swapfile.c >> @@ -46,7 +46,7 @@ static void free_swap_count_continuations(struct swap_info_struct *); >> static sector_t map_swap_entry(swp_entry_t, struct block_device**); >> >> DEFINE_SPINLOCK(swap_lock); >> -static unsigned int nr_swapfiles; >> +unsigned int nr_swapfiles; >> long nr_swap_pages; >> long total_swap_pages; >> static int least_priority; >> -- >> 1.7.9.5 >> >> -- >> 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 > -- 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