mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] /proc/vmload memory_pressure meter
@ 2001-08-30 10:47 Paul Larson
  2001-08-30 21:14 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Larson @ 2001-08-30 10:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

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

diff -urN linux-2.4.10-pre2/fs/proc/proc_misc.c linux-2.4.10-pre2-vmload/fs/proc/proc_misc.c
--- linux-2.4.10-pre2/fs/proc/proc_misc.c	Thu Aug 30 09:51:47 2001
+++ linux-2.4.10-pre2-vmload/fs/proc/proc_misc.c	Thu Aug 30 09:55:10 2001
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] /proc/vmload memory_pressure meter
  2001-08-30 10:47 [PATCH] /proc/vmload memory_pressure meter Paul Larson
@ 2001-08-30 21:14 ` Rik van Riel
  0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2001-08-30 21:14 UTC (permalink / raw)
  To: Paul Larson; +Cc: Linus Torvalds, linux-kernel

On 30 Aug 2001, Paul Larson wrote:

> 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).

You can find this value in /proc/meminfo, too.

regards,

Rik
--
IA64: a worthy successor to the i860.

		http://www.surriel.com/
http://www.conectiva.com/	http://distro.conectiva.com/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-30 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-30 10:47 [PATCH] /proc/vmload memory_pressure meter Paul Larson
2001-08-30 21:14 ` Rik van Riel

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®