From: Wu Fengguang <fengguang.wu@intel.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>, Mel Gorman <mel@csn.ul.ie>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH for mmotm 2/5]
Date: Fri, 12 Jun 2009 07:29:37 +0800 [thread overview]
Message-ID: <20090611232937.GB5960@localhost> (raw)
In-Reply-To: <20090611192600.6D50.A69D9226@jp.fujitsu.com>
On Thu, Jun 11, 2009 at 06:26:48PM +0800, KOSAKI Motohiro wrote:
> Changes since Wu's original patch
> - adding vmstat
> - rename NR_TMPFS_MAPPED to NR_SWAP_BACKED_FILE_MAPPED
>
>
> ----------------------
> Subject: [PATCH] introduce NR_SWAP_BACKED_FILE_MAPPED zone stat
>
> Desirable zone reclaim implementaion want to know the number of
> file-backed and unmapped pages.
>
> Thus, we need to know number of swap-backed mapped pages for
> calculate above number.
>
>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> ---
> include/linux/mmzone.h | 2 ++
> mm/rmap.c | 7 +++++++
> mm/vmstat.c | 1 +
> 3 files changed, 10 insertions(+)
>
> Index: b/include/linux/mmzone.h
> ===================================================================
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -88,6 +88,8 @@ enum zone_stat_item {
> NR_ANON_PAGES, /* Mapped anonymous pages */
> NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
> only modified from process context */
> + NR_SWAP_BACKED_FILE_MAPPED, /* Similar to NR_FILE_MAPPED. but
comment it as "a subset of NR_FILE_MAPPED"?
Why move this 'cold' item to the first hot cache line?
> + only account swap-backed pages */
> NR_FILE_PAGES,
> NR_FILE_DIRTY,
> NR_WRITEBACK,
> Index: b/mm/rmap.c
> ===================================================================
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -829,6 +829,10 @@ void page_add_file_rmap(struct page *pag
> {
> if (atomic_inc_and_test(&page->_mapcount)) {
> __inc_zone_page_state(page, NR_FILE_MAPPED);
> + if (PageSwapBacked(page))
> + __inc_zone_page_state(page,
> + NR_SWAP_BACKED_FILE_MAPPED);
> +
The line wrapping is not necessary here.
> mem_cgroup_update_mapped_file_stat(page, 1);
> }
> }
> @@ -884,6 +888,9 @@ void page_remove_rmap(struct page *page)
> __dec_zone_page_state(page, NR_ANON_PAGES);
> } else {
> __dec_zone_page_state(page, NR_FILE_MAPPED);
> + if (PageSwapBacked(page))
> + __dec_zone_page_state(page,
> + NR_SWAP_BACKED_FILE_MAPPED);
ditto.
> }
> mem_cgroup_update_mapped_file_stat(page, -1);
> /*
> Index: b/mm/vmstat.c
> ===================================================================
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -633,6 +633,7 @@ static const char * const vmstat_text[]
> "nr_mlock",
> "nr_anon_pages",
> "nr_mapped",
> + "nr_swap_backed_file_mapped",
An overlong name, in my updated patch, I do it this way.
"nr_bounce",
"nr_vmscan_write",
"nr_writeback_temp",
+ "nr_mapped_swapbacked",
The "mapped" comes first because I want to emphasis that
this is a subset of nr_mapped.
Thanks,
Fengguang
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>, Mel Gorman <mel@csn.ul.ie>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH for mmotm 2/5]
Date: Fri, 12 Jun 2009 07:29:37 +0800 [thread overview]
Message-ID: <20090611232937.GB5960@localhost> (raw)
In-Reply-To: <20090611192600.6D50.A69D9226@jp.fujitsu.com>
On Thu, Jun 11, 2009 at 06:26:48PM +0800, KOSAKI Motohiro wrote:
> Changes since Wu's original patch
> - adding vmstat
> - rename NR_TMPFS_MAPPED to NR_SWAP_BACKED_FILE_MAPPED
>
>
> ----------------------
> Subject: [PATCH] introduce NR_SWAP_BACKED_FILE_MAPPED zone stat
>
> Desirable zone reclaim implementaion want to know the number of
> file-backed and unmapped pages.
>
> Thus, we need to know number of swap-backed mapped pages for
> calculate above number.
>
>
> Cc: Mel Gorman <mel@csn.ul.ie>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> ---
> include/linux/mmzone.h | 2 ++
> mm/rmap.c | 7 +++++++
> mm/vmstat.c | 1 +
> 3 files changed, 10 insertions(+)
>
> Index: b/include/linux/mmzone.h
> ===================================================================
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -88,6 +88,8 @@ enum zone_stat_item {
> NR_ANON_PAGES, /* Mapped anonymous pages */
> NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
> only modified from process context */
> + NR_SWAP_BACKED_FILE_MAPPED, /* Similar to NR_FILE_MAPPED. but
comment it as "a subset of NR_FILE_MAPPED"?
Why move this 'cold' item to the first hot cache line?
> + only account swap-backed pages */
> NR_FILE_PAGES,
> NR_FILE_DIRTY,
> NR_WRITEBACK,
> Index: b/mm/rmap.c
> ===================================================================
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -829,6 +829,10 @@ void page_add_file_rmap(struct page *pag
> {
> if (atomic_inc_and_test(&page->_mapcount)) {
> __inc_zone_page_state(page, NR_FILE_MAPPED);
> + if (PageSwapBacked(page))
> + __inc_zone_page_state(page,
> + NR_SWAP_BACKED_FILE_MAPPED);
> +
The line wrapping is not necessary here.
> mem_cgroup_update_mapped_file_stat(page, 1);
> }
> }
> @@ -884,6 +888,9 @@ void page_remove_rmap(struct page *page)
> __dec_zone_page_state(page, NR_ANON_PAGES);
> } else {
> __dec_zone_page_state(page, NR_FILE_MAPPED);
> + if (PageSwapBacked(page))
> + __dec_zone_page_state(page,
> + NR_SWAP_BACKED_FILE_MAPPED);
ditto.
> }
> mem_cgroup_update_mapped_file_stat(page, -1);
> /*
> Index: b/mm/vmstat.c
> ===================================================================
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -633,6 +633,7 @@ static const char * const vmstat_text[]
> "nr_mlock",
> "nr_anon_pages",
> "nr_mapped",
> + "nr_swap_backed_file_mapped",
An overlong name, in my updated patch, I do it this way.
"nr_bounce",
"nr_vmscan_write",
"nr_writeback_temp",
+ "nr_mapped_swapbacked",
The "mapped" comes first because I want to emphasis that
this is a subset of nr_mapped.
Thanks,
Fengguang
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-06-11 23:30 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-11 10:25 [PATCH for mmotm 0/5] introduce swap-backed-file-mapped count and fix vmscan-change-the-number-of-the-unmapped-files-in-zone-reclaim.patch KOSAKI Motohiro
2009-06-11 10:25 ` KOSAKI Motohiro
2009-06-11 10:26 ` [PATCH for mmotm 1/5] cleanp page_remove_rmap() KOSAKI Motohiro
2009-06-11 10:26 ` KOSAKI Motohiro
2009-06-11 11:01 ` Mel Gorman
2009-06-11 11:01 ` Mel Gorman
2009-06-11 23:21 ` Wu Fengguang
2009-06-11 23:21 ` Wu Fengguang
2009-06-11 10:26 ` [PATCH for mmotm 2/5] KOSAKI Motohiro
2009-06-11 10:26 ` KOSAKI Motohiro
2009-06-11 11:13 ` Mel Gorman
2009-06-11 11:13 ` Mel Gorman
2009-06-11 11:50 ` KOSAKI Motohiro
2009-06-11 11:50 ` KOSAKI Motohiro
2009-06-12 10:22 ` Mel Gorman
2009-06-12 10:22 ` Mel Gorman
2009-06-11 23:29 ` Wu Fengguang [this message]
2009-06-11 23:29 ` Wu Fengguang
2009-06-11 10:27 ` [PATCH for mmotm 3/5] add Mapped(SwapBacked) field to /proc/meminfo KOSAKI Motohiro
2009-06-11 10:27 ` KOSAKI Motohiro
2009-06-11 10:27 ` [PATCH for mmotm 4/5] adjust fields length of /proc/meminfo KOSAKI Motohiro
2009-06-11 10:27 ` KOSAKI Motohiro
2009-06-11 10:28 ` [PATCH for mmotm 5/5] fix vmscan-change-the-number-of-the-unmapped-files-in-zone-reclaim.patch KOSAKI Motohiro
2009-06-11 10:28 ` KOSAKI Motohiro
2009-06-11 11:15 ` Mel Gorman
2009-06-11 11:15 ` Mel Gorman
2009-06-11 10:38 ` [PATCH for mmotm 0/5] introduce swap-backed-file-mapped count and " Mel Gorman
2009-06-11 10:38 ` Mel Gorman
2009-06-11 10:42 ` KOSAKI Motohiro
2009-06-11 10:42 ` KOSAKI Motohiro
2009-06-11 10:53 ` Mel Gorman
2009-06-11 10:53 ` Mel Gorman
2009-06-11 11:32 ` KOSAKI Motohiro
2009-06-11 11:32 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090611232937.GB5960@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.