lkml.org 
[lkml]   [2002]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] Add amount of cached memory to sysreq-m output
Hi,

this small patch against fs/buffer.c adds the Cached memory to the
output of sysreq-m requests. Applies against 2.4.18-pre8.

--- buffer.c.orig Wed Feb 6 13:46:19 2002
+++ buffer.c Wed Feb 6 13:48:55 2002
@@ -2724,6 +2724,9 @@
printk("Buffer memory: %6dkB\n",
atomic_read(&buffermem_pages) <<
(PAGE_SHIFT-10));

+ printk("Cache memory: %6dkB\n",
+
(atomic_read(&page_cache_size)-atomic_read(&buffermem_pages)) <<
(PAGE_SHIFT-10));
+
#ifdef CONFIG_SMP /* trylock does nothing on UP and so we could
deadlock */
if (!spin_trylock(&lru_list_lock))
return;

Martin
--
------------------------------------------------------------------
Martin Knoblauch | email: Martin.Knoblauch@TeraPort.de
TeraPort GmbH | Phone: +49-89-510857-309
C+ITS | Fax: +49-89-510857-111
http://www.teraport.de | Mobile: +49-170-4904759--- buffer.c.orig Wed Feb 6 13:46:19 2002
+++ buffer.c Wed Feb 6 13:48:55 2002
@@ -2724,6 +2724,9 @@
printk("Buffer memory: %6dkB\n",
atomic_read(&buffermem_pages) << (PAGE_SHIFT-10));

+ printk("Cache memory: %6dkB\n",
+ (atomic_read(&page_cache_size)- atomic_read(&buffermem_pages)) << (PAGE_SHIFT-10));
+
#ifdef CONFIG_SMP /* trylock does nothing on UP and so we could deadlock */
if (!spin_trylock(&lru_list_lock))
return;
\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.029 / U:13.916 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site