From: "J . A . Magallon" <jamagallon@able.es>
To: Lista Linux-Kernel <linux-kernel@vger.kernel.org>
Cc: Alan Cox <laughing@shared-source.org>,
Linus Torvalds <torvalds@transmeta.com>
Subject: cache acoounting in Linus tree
Date: Sat, 10 Nov 2001 02:57:22 +0100 [thread overview]
Message-ID: <20011110025722.A1526@werewolf.able.es> (raw)
Hi.
Does Linus' tree need the cache accounting patch ? Listed below. Please,
confirm or deny....
--- linux-2.4.13-ac5/fs/proc/proc_misc.c.blkpg Wed Oct 31 13:09:51 2001
+++ linux-2.4.13-ac5/fs/proc/proc_misc.c Wed Oct 31 13:12:27 2001
@@ -140,7 +140,9 @@
{
struct sysinfo i;
int len;
- int pg_size ;
+ unsigned int cached;
+
+ cached = atomic_read(&page_cache_size) - atomic_read(&shmem_nrpages);
/*
* display in kilobytes.
@@ -149,14 +151,12 @@
#define B(x) ((unsigned long long)(x) << PAGE_SHIFT)
si_meminfo(&i);
si_swapinfo(&i);
- pg_size = atomic_read(&page_cache_size) - i.bufferram ;
-
len = sprintf(page, " total: used: free: shared: buffers: cached:\n"
"Mem: %8Lu %8Lu %8Lu %8Lu %8Lu %8Lu\n"
"Swap: %8Lu %8Lu %8Lu\n",
B(i.totalram), B(i.totalram-i.freeram), B(i.freeram),
B(i.sharedram), B(i.bufferram),
- B(pg_size), B(i.totalswap),
+ B(cached), B(i.totalswap),
B(i.totalswap-i.freeswap), B(i.freeswap));
/*
* Tagged format, for easy grepping and expansion.
@@ -182,7 +182,7 @@
K(i.freeram),
K(i.sharedram),
K(i.bufferram),
- K(pg_size - swapper_space.nrpages),
+ K(cached - swapper_space.nrpages),
K(swapper_space.nrpages),
K(nr_active_pages),
K(nr_inactive_pages),
--
J.A. Magallon # Let the source be with you...
mailto:jamagallon@able.es
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.15-pre2-beo #1 SMP Sat Nov 10 02:24:33 CET 2001 i686
next reply other threads:[~2001-11-10 1:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-10 1:57 J . A . Magallon [this message]
2001-11-10 11:11 ` cache acoounting in Linus tree Hugh Dickins
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=20011110025722.A1526@werewolf.able.es \
--to=jamagallon@able.es \
--cc=laughing@shared-source.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox