lkml.org 
[lkml]   [2001]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Add information to SysRq+M output

Hi,

Here goes a patch, against 2.4.10pre3, which adds very useful information
to Alt+SysRq+M: it prints per-zone free information (freepages,
freepages.min, freepages.low, freepages.high).

Linus, pleasy apply.

--- linux/mm/page_alloc.c.orig Thu Oct 4 17:18:00 2001
+++ linux/mm/page_alloc.c Thu Oct 4 17:18:12 2001
@@ -515,6 +515,30 @@
{
unsigned int order;
unsigned type;
+ pg_data_t *tmpdat = pgdat;
+
+ printk("Free pages: %6dkB (%6dkB HighMem)\n",
+ nr_free_pages() << (PAGE_SHIFT-10),
+ nr_free_highpages() << (PAGE_SHIFT-10));
+
+ while (tmpdat) {
+ zone_t *zone;
+ for (zone = tmpdat->node_zones;
+ zone < tmpdat->node_zones + MAX_NR_ZONES; zone++)
+ printk("Zone:%s freepages:%6dkB min:%6dKB low:%6dkB "
+ "high:%6dkB\n",
+ zone->name,
+ (zone->free_pages)
+ << ((PAGE_SHIFT-10)),
+ zone->pages_min
+ << ((PAGE_SHIFT-10)),
+ zone->pages_low
+ << ((PAGE_SHIFT-10)),
+ zone->pages_high
+ << ((PAGE_SHIFT-10)));
+
+ tmpdat = tmpdat->node_next;
+ }

printk("Free pages: %6dkB (%6dkB HighMem)\n",
nr_free_pages() << (PAGE_SHIFT-10),
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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