/proc/vmload memory_pressure meter
PATCH 1/1 /proc/vmload memory_pressure meter
This patch adds /proc/vmload that reports the current value of memory_pressure. The idea came from an enhancement proposed on the linux-mm bugzilla (#3007, but it seems to be down atm).
This patch was made against 2.4.10-pre2.
-Paul Larson
fs/proc/proc_misc.c +10 -0
@@ -199,6 +199,15 @@#undef K } +vmload_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) { +int len =0 ; + + len +=sprintf (page+len,"%d\n" , memory_pressure); + *eof =1 ; +return len; +} +static int version_read_proc (char *page,char **start,off_t off,int count,int *eof,void *data) {
@@ -518,6 +527,7 @@ {"loadavg", loadavg_read_proc}, {"uptime", uptime_read_proc}, {"meminfo", meminfo_read_proc}, + {"vmload", vmload_read_proc}, {"version", version_read_proc}, {"cpuinfo", cpuinfo_read_proc}, #ifdef CONFIG_PROC_HARDWARE
Quoted 3 lines · Paul Larson
This patch adds
/proc/vmloadthat reports the current value ofmemory_pressure. The idea came from an enhancement proposed on the linux-mm bugzilla (#3007, but it seems to be down atm).
You can find this value in /proc/meminfo, too.
regards,
Rik
--
IA64: a worthy successor to the i860.
http://www.surriel.com/