Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 4 Oct 2001 16:20:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 4 Oct 2001 16:20:10 -0400 Received: from perninha.conectiva.com.br ([200.250.58.156]:57350 "HELO perninha.conectiva.com.br") by vger.kernel.org with SMTP id ; Thu, 4 Oct 2001 16:19:58 -0400 Date: Thu, 4 Oct 2001 15:58:02 -0300 (BRT) From: Marcelo Tosatti To: Linus Torvalds Cc: lkml , Rik van Riel , Andrea Arcangeli Subject: [PATCH] Add information to SysRq+M output Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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/