From: Martin Knoblauch <Martin.Knoblauch@TeraPort.de>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: marcelo@conectiva.com.br
Subject: [PATCH] Add amount of cached memory to sysreq-m output
Date: Wed, 06 Feb 2002 14:16:01 +0100 [thread overview]
Message-ID: <3C612C91.38441A85@TeraPort.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
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
[-- Attachment #2: buffer.c-patch --]
[-- Type: text/plain, Size: 448 bytes --]
--- 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;
reply other threads:[~2002-02-06 13:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3C612C91.38441A85@TeraPort.de \
--to=martin.knoblauch@teraport.de \
--cc=linux-kernel@vger.kernel.org \
--cc=m.knoblauch@TeraPort.de \
--cc=marcelo@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.