From: Nick Piggin <npiggin@suse.de>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [patch] mm: pcp stats
Date: Wed, 22 Feb 2006 15:33:57 +0100 [thread overview]
Message-ID: <20060222143357.GJ15546@wotan.suse.de> (raw)
In-Reply-To: <20060222143217.GI15546@wotan.suse.de>
Following patch offers some stats about pageset activity.
Index: linux-2.6/mm/page_alloc.c
===================================================================
--- linux-2.6.orig/mm/page_alloc.c
+++ linux-2.6/mm/page_alloc.c
@@ -720,6 +720,7 @@ static void fastcall free_hot_cold_page(
pset = zone_pcp(zone, get_cpu());
local_irq_save(flags);
__inc_page_state(pgfree);
+ __inc_page_state(pcpfree);
pset->count++;
if (cold) {
pset->cold_count++;
@@ -733,6 +734,7 @@ static void fastcall free_hot_cold_page(
free_pages_bulk(zone, count, &pset->list, 0);
pset->cold_count -= min(count, pset->cold_count);
pset->count -= count;
+ __mod_page_state(pcpspill, count);
}
local_irq_restore(flags);
put_cpu();
@@ -794,8 +796,10 @@ again:
goto failed;
pset->count += count;
pset->cold_count += count;
+ __mod_page_state(pcpfill, count);
}
+ __inc_page_state(pcpalloc);
pset->count--;
if (cold) {
page = list_entry(pset->list.prev, struct page, lru);
@@ -2319,6 +2323,10 @@ static char *vmstat_text[] = {
"pgalloc_dma",
"pgfree",
+ "pcpalloc",
+ "pcpfree",
+ "pcpfill",
+ "pcpspill",
"pgactivate",
"pgdeactivate",
Index: linux-2.6/include/linux/page-flags.h
===================================================================
--- linux-2.6.orig/include/linux/page-flags.h
+++ linux-2.6/include/linux/page-flags.h
@@ -117,6 +117,10 @@ struct page_state {
unsigned long pgalloc_dma;
unsigned long pgfree; /* page freeings */
+ unsigned long pcpalloc; /* pages allocated from pcp lists */
+ unsigned long pcpfree; /* pages freed into pcp lists */
+ unsigned long pcpfill; /* pages allocated into pcp lists */
+ unsigned long pcpspill; /* pages freed from pcp lists */
unsigned long pgactivate; /* pages moved inactive->active */
unsigned long pgdeactivate; /* pages moved active->inactive */
--
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:[~2006-02-22 14:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-22 14:32 [RFC][patch] mm: single pcp lists Nick Piggin
2006-02-22 14:33 ` Nick Piggin [this message]
2006-02-22 22:20 ` Joel Schopp
2006-02-23 4:28 ` Nick Piggin
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=20060222143357.GJ15546@wotan.suse.de \
--to=npiggin@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox