lkml.org 
[lkml]   [2007]   [Jul]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subjectmaps2-make-proc-pid-smaps-optional-under-config_embedded.patch
    FromRusty Russell <>
    DateSun, 08 Jul 2007 16:19:34 +1000
    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
     
    
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    
    
    \
     
     \ /
      Last update: 2007-07-08 08:23    [from the cache]
    ©2003-2008