lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080301214315.529B.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date:	Sat, 01 Mar 2008 21:46:52 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Rik van Riel <riel@...hat.com>
Cc:	kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org,
	Lee Schermerhorn <Lee.Schermerhorn@...com>, linux-mm@...ck.org
Subject: Re: [patch 06/21] split LRU lists into anon & file sets

Hi

> @@ -153,43 +153,47 @@ static int meminfo_read_proc(char *page,
>  	 * Tagged format, for easy grepping and expansion.
>  	 */
>  	len = sprintf(page,
> -		"MemTotal:     %8lu kB\n"
> -		"MemFree:      %8lu kB\n"
> -		"Buffers:      %8lu kB\n"
> -		"Cached:       %8lu kB\n"
> -		"SwapCached:   %8lu kB\n"
> -		"Active:       %8lu kB\n"
> -		"Inactive:     %8lu kB\n"
> +		"MemTotal:       %8lu kB\n"
> +		"MemFree:        %8lu kB\n"
> +		"Buffers:        %8lu kB\n"
> +		"Cached:         %8lu kB\n"
> +		"SwapCached:     %8lu kB\n"
> +		"Active(anon):   %8lu kB\n"
> +		"Inactive(anon): %8lu kB\n"
> +		"Active(file):   %8lu kB\n"
> +		"Inactive(file): %8lu kB\n"

Unfortunately this change corrupt "vmstat -a".
could we add field instead replace it?

-kosaki


---
 fs/proc/proc_misc.c |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

Index: b/fs/proc/proc_misc.c
===================================================================
--- a/fs/proc/proc_misc.c       2008-03-01 21:32:13.000000000 +0900
+++ b/fs/proc/proc_misc.c       2008-03-01 21:39:04.000000000 +0900
@@ -131,6 +131,10 @@ static int meminfo_read_proc(char *page,
        unsigned long allowed;
        struct vmalloc_info vmi;
        long cached;
+       unsigned long active_anon;
+       unsigned long inactive_anon;
+       unsigned long active_file;
+       unsigned long inactive_file;

 /*
  * display in kilobytes.
@@ -149,6 +153,11 @@ static int meminfo_read_proc(char *page,

        get_vmalloc_info(&vmi);

+       active_anon   = global_page_state(NR_ACTIVE_ANON);
+       inactive_anon = global_page_state(NR_INACTIVE_ANON);
+       active_file   = global_page_state(NR_ACTIVE_FILE);
+       inactive_file = global_page_state(NR_INACTIVE_FILE);
+
        /*
         * Tagged format, for easy grepping and expansion.
         */
@@ -158,6 +167,8 @@ static int meminfo_read_proc(char *page,
                "Buffers:        %8lu kB\n"
                "Cached:         %8lu kB\n"
                "SwapCached:     %8lu kB\n"
+               "Active:         %8lu kB\n"
+               "Inactive:       %8lu kB\n"
                "Active(anon):   %8lu kB\n"
                "Inactive(anon): %8lu kB\n"
                "Active(file):   %8lu kB\n"
@@ -190,10 +201,12 @@ static int meminfo_read_proc(char *page,
                K(i.bufferram),
                K(cached),
                K(total_swapcache_pages),
-               K(global_page_state(NR_ACTIVE_ANON)),
-               K(global_page_state(NR_INACTIVE_ANON)),
-               K(global_page_state(NR_ACTIVE_FILE)),
-               K(global_page_state(NR_INACTIVE_FILE)),
+               K(active_anon   + active_file),
+               K(inactive_anon + inactive_file),
+               K(active_anon),
+               K(inactive_anon),
+               K(active_file),
+               K(inactive_file),
 #ifdef CONFIG_HIGHMEM
                K(i.totalhigh),
                K(i.freehigh),




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ