mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] buffermem_pages removal (3/5)
Date: Tue, 21 May 2002 14:10:03 +0100	[thread overview]
Message-ID: <20020521141003.C15796@infradead.org> (raw)

This one is a bit more controveral as it may break stupid userlevel
programs:  remove the 'Buffers' field from /proc/meminfo and make
the Cached field show the full pagecache size instead of subtracting
the block-device backed pages.

All /proc/meminfo-using programs I have (free, top) still work fine.


--- 1.24/fs/proc/proc_misc.c	Fri May  3 07:01:31 2002
+++ edited/fs/proc/proc_misc.c	Tue May 21 14:28:39 2002
@@ -130,7 +130,6 @@
 {
 	struct sysinfo i;
 	int len;
-	int pg_size ;
 	struct page_state ps;
 
 	get_page_state(&ps);
@@ -140,7 +139,6 @@
 #define K(x) ((x) << (PAGE_SHIFT - 10))
 	si_meminfo(&i);
 	si_swapinfo(&i);
-	pg_size = get_page_cache_size() - i.bufferram ;
 
 	/*
 	 * Tagged format, for easy grepping and expansion.
@@ -149,7 +147,6 @@
 		"MemTotal:     %8lu kB\n"
 		"MemFree:      %8lu kB\n"
 		"MemShared:    %8lu kB\n"
-		"Buffers:      %8lu kB\n"
 		"Cached:       %8lu kB\n"
 		"SwapCached:   %8lu kB\n"
 		"Active:       %8u kB\n"
@@ -165,8 +162,7 @@
 		K(i.totalram),
 		K(i.freeram),
 		K(i.sharedram),
-		K(i.bufferram),
-		K(pg_size - swapper_space.nrpages),
+		K(ps.nr_pagecache-swapper_space.nrpages),
 		K(swapper_space.nrpages),
 		K(nr_active_pages),
 		K(nr_inactive_pages),

                 reply	other threads:[~2002-05-21 13:11 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=20020521141003.C15796@infradead.org \
    --to=hch@infradead.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

all inboxes | Powered by JetHome®