[lkml]   [2001]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Tools better than vmstat [was: 2.4.9-ac16 good perfomer?]
On Fri, Sep 28, 2001 at 03:33:01PM -0700, Mike Fedyk wrote:
> Is sysrq easier to code for, or initiate-on-proc-read?

It's more to do with the framework that the debug code uses - you
effectively provide it with a function to do whatever analysis you
want on the pages, and it calls it for each and every page in each
zone. After each zone, it calls it with NULL to allow you to
display any statistics you've gathered for the zone.

It repeats this across all nodes and all zones, so you get the full

There are currently two functions implemented - dump the raw data
for every single page in an easy to read format (but it is very
verbose, and takes a long time to dump out on large machines).
The second gives a summary of reserved, slab, ramdisk, free and
anonymous pages found in the zone.

I guess you'd need to do something like:

static unsigned int zone_age[MAX_AGE - MIN_AGE];

static void page_ages(struct page *page)
int i;
if (page) {
zone_age[page->age - MIN_AGE]++;

for (i = MIN_AGE; i < MAX_AGE; i++) {
printk(" Age %d: %u pages\n", i, zone_age[i]);
zone_age[i] = 0;

I'll dig out the patch tomorrow.

Russell King ( The developer of ARM Linux

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:03    [W:0.061 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site