From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 22 Nov 2007 12:07:32 +0900 From: kosaki Subject: Re: [PATCH] mem notifications v2 In-Reply-To: <20071121195316.GA21481@dmt> References: <20071121195316.GA21481@dmt> Message-Id: <20071122114532.E9E1.KOSAKI.MOTOHIRO@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Marcelo Tosatti Cc: kosaki.motohiro@jp.fujitsu.com, linux-mm@kvack.org, Daniel =?ISO-2022-JP?B?U3AbJEJpTxsoQmc=?= , Andrew Morton , Rik van Riel List-ID: Hi Marcelo, I am interesting your patch. and I have some stupid question. please tell me. > static struct class *mem_class; > --- linux-2.6.24-rc2-mm1.orig/include/linux/swap.h 2007-11-14 23:51:28.000000000 -0200 > +++ linux-2.6.24-rc2-mm1/include/linux/swap.h 2007-11-21 15:40:23.000000000 -0200 > @@ -169,6 +169,8 @@ > /* Definition of global_page_state not available yet */ > #define nr_free_pages() global_page_state(NR_FREE_PAGES) > > +#define total_anon_pages() (global_page_state(NR_ANON_PAGES) \ > + + total_swap_pages - total_swapcache_pages) Why you use total_swap_pages? Are your intent watching swapon/spwapoff syscall? or, s/total_swapcache_pages/nr_swap_pages/ ? > @@ -1199,7 +1208,7 @@ > throttle_vm_writeout(sc->gfp_mask); > return nr_reclaimed; > } > - > + > /* > * This is the direct reclaim path, for page-allocating processes. We only > * try to reclaim pages from zones which will satisfy the caller's allocation cut here, please. -- kosaki -- 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