diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:23:54 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:23:54 -0800 |
| commit | ad8dcf57e93e8e5f9b815e786da35ef03fc70f89 (patch) | |
| tree | f3394afd32c183a41ccbc649859ad505c5e8c09c /fs/proc/proc_misc.c | |
| parent | 4c7ed1860c0d21292284fb044c465ba00ce89b7f (diff) | |
v2.4.12 -> v2.4.12.1
- Trond Myklebust: deadlock checking in lockd server
- Tim Waugh: fix up parport wrong #define
- Christoph Hellwig: i2c update, ext2 cleanup
- Al Viro: fix partition handling sanity check.
- Trond Myklebust: make NFS use SLAB_NOFS, and not play games with PF_MEMALLOC
- Ben Fennema: UDF update
- Alan Cox: continued merging
- Chris Mason: get /proc buffer memory sizes right after buf-in-page-cache
Diffstat (limited to 'fs/proc/proc_misc.c')
| -rw-r--r-- | fs/proc/proc_misc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index f041736e515f..e1601dba7ca8 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -140,6 +140,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, { struct sysinfo i; int len; + int pg_size ; /* * display in kilobytes. @@ -148,12 +149,14 @@ static int meminfo_read_proc(char *page, char **start, off_t off, #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(atomic_read(&page_cache_size)), B(i.totalswap), + B(pg_size), B(i.totalswap), B(i.totalswap-i.freeswap), B(i.freeswap)); /* * Tagged format, for easy grepping and expansion. @@ -179,7 +182,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, K(i.freeram), K(i.sharedram), K(i.bufferram), - K(atomic_read(&page_cache_size) - swapper_space.nrpages), + K(pg_size - swapper_space.nrpages), K(swapper_space.nrpages), K(nr_active_pages), K(nr_inactive_pages), |
