mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* maps2-make-proc-pid-smaps-optional-under-config_embedded.patch
@ 2007-07-08  6:19 Rusty Russell
  2007-07-09 20:24 ` maps2-make-proc-pid-smaps-optional-under-config_embedded.patch Matt Mackall
  0 siblings, 1 reply; 3+ messages in thread
From: Rusty Russell @ 2007-07-08  6:19 UTC (permalink / raw)
  To: Matt Mackall
  Cc: Jeremy Fitzhardinge, David Rientjes, Andrew Morton,
	lkml - Kernel Mailing List

Matt wrote:
> This interface is primarily useful for doing memory profiling and not much use
> on deployed embedded boxes.  Make it optional.  Together with
> /proc/pid/clear_refs, this save a few K.

How about a single config option for all these?

===
maps2-CONFIG_PROC_PAGE_MONITOR.patch

Merge the three config options PROC_SMAPS/PROC_CLEAR_REFS/PROC_PAGEMAP
and report the approximate memory usage (i386 SMP).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r 5a7ada4f5442 init/Kconfig
--- a/init/Kconfig	Sun Jul 08 15:29:26 2007 +1000
+++ b/init/Kconfig	Sun Jul 08 16:01:35 2007 +1000
@@ -636,32 +636,14 @@ config SLOB
 
 endchoice
 
-config PROC_SMAPS
-	default y
-	bool "Enable /proc/pid/smaps support" if EMBEDDED && PROC_FS && MMU
-	help
-	  The /proc/pid/smaps interface reports a process's private and
-          shared memory per mapping. Disabling this interface will reduce
-          the size of the kernel for small machines.
-
-config PROC_CLEAR_REFS
-	default y
-	bool "Enable /proc/pid/clear_refs support" if EMBEDDED && PROC_FS && MMU
-	help
-	  The /proc/pid/clear_refs interface allows clearing the
-          referenced bits on a process's memory maps to allow monitoring
-          working set size. Disabling this interface will reduce
-          the size of the kernel for small machines.
-
-config PROC_PAGEMAP
-	default y
-	bool "Enable /proc/pid/pagemap support" if EMBEDDED && PROC_FS && MMU
-	help
-	  The /proc/pid/pagemap interface allows reading the
-          kernel's virtual memory to page frame mapping to determine which
-          individual pages a process has mapped and which pages it shares
-          with other processes. Disabling this interface will reduce the
-          size of the kernel for small machines.
+config PROC_PAGE_MONITOR
+	default y
+	bool "Enable /proc page monitoring" if EMBEDDED && PROC_FS && MMU
+	help
+	  Various /proc files exist to monitor process memory utilization:
+	  /proc/pid/smaps, /proc/pid/clear_refs and /proc/pid/pagemap.
+	  Disabling these interfaces will reduce the size of the kernel by
+	  approximately 4kb.
 
 config PROC_KPAGEMAP
 	default y
@@ -670,7 +652,7 @@ config PROC_KPAGEMAP
 	  The /proc/pid/kpagemap interface allows reading the
           kernel's per-page flag and usage counts to gather precise
           information on page-level memory usage. Disabling this interface
-          will reduce the size of the kernel for small machines.
+          will reduce the size of the kernel by around 600 bytes.
 
 endmenu		# General setup
 



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

end of thread, other threads:[~2007-07-10  2:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-08  6:19 maps2-make-proc-pid-smaps-optional-under-config_embedded.patch Rusty Russell
2007-07-09 20:24 ` maps2-make-proc-pid-smaps-optional-under-config_embedded.patch Matt Mackall
2007-07-10  2:08   ` maps2-make-proc-pid-smaps-optional-under-config_embedded.patch Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome