patch-2.3.7 linux/fs/proc/array.c
Next file: linux/fs/proc/base.c
Previous file: linux/fs/pipe.c
Back to the patch index
Back to the overall index
- Lines: 77
- Date:
Sat Jun 19 11:45:28 1999
- Orig file:
v2.3.6/linux/fs/proc/array.c
- Orig date:
Tue May 11 16:30:45 1999
diff -u --recursive --new-file v2.3.6/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -348,7 +348,7 @@
len = sprintf(buffer, " total: used: free: shared: buffers: cached:\n"
"Mem: %8lu %8lu %8lu %8lu %8lu %8lu\n"
"Swap: %8lu %8lu %8lu\n",
- i.totalram, i.totalram-i.freeram, i.freeram, i.sharedram, i.bufferram, page_cache_size*PAGE_SIZE,
+ i.totalram, i.totalram-i.freeram, i.freeram, i.sharedram, i.bufferram, atomic_read(&page_cache_size)*PAGE_SIZE,
i.totalswap, i.totalswap-i.freeswap, i.freeswap);
/*
* Tagged format, for easy grepping and expansion. The above will go away
@@ -359,14 +359,14 @@
"MemFree: %8lu kB\n"
"MemShared: %8lu kB\n"
"Buffers: %8lu kB\n"
- "Cached: %8lu kB\n"
+ "Cached: %8u kB\n"
"SwapTotal: %8lu kB\n"
"SwapFree: %8lu kB\n",
i.totalram >> 10,
i.freeram >> 10,
i.sharedram >> 10,
i.bufferram >> 10,
- page_cache_size << (PAGE_SHIFT - 10),
+ atomic_read(&page_cache_size) << (PAGE_SHIFT - 10),
i.totalswap >> 10,
i.freeswap >> 10);
}
@@ -975,7 +975,7 @@
++*dirty;
if (MAP_NR(pte_page(page)) >= max_mapnr)
continue;
- if (atomic_read(&mem_map[MAP_NR(pte_page(page))].count) > 1)
+ if (page_count(mem_map + MAP_NR(pte_page(page))) > 1)
++*shared;
} while (address < end);
}
@@ -1326,6 +1326,9 @@
case PROC_IOPORTS:
return get_ioport_list(page);
+
+ case PROC_MEMORY:
+ return get_mem_list(page);
#ifdef CONFIG_BLK_DEV_MD
case PROC_MD:
return get_md_status(page);
@@ -1516,11 +1519,14 @@
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
+ NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
- NULL, /* bmap */
+ NULL, /* flushpage */
NULL, /* truncate */
- NULL /* permission */
+ NULL, /* permission */
+ NULL, /* smap */
+ NULL /* revalidate */
};
static ssize_t arraylong_read(struct file * file, char * buf,
@@ -1564,9 +1570,12 @@
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
+ NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
- NULL, /* bmap */
+ NULL, /* flushpage */
NULL, /* truncate */
- NULL /* permission */
+ NULL, /* permission */
+ NULL, /* smap */
+ NULL /* revalidate */
};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)