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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <468D3C6C.8060900@linux.vnet.ibm.com>
Date:	Fri, 06 Jul 2007 00:16:04 +0530
From:	Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>
To:	Balbir Singh <balbir@...ux.vnet.ibm.com>
CC:	Andrew Morton <akpm@...l.org>, Pavel Emelianov <xemul@...nvz.org>,
	Linux Containers <containers@...ts.osdl.org>,
	Paul Menage <menage@...gle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [-mm PATCH 4/7] Memory controller memory accounting



Balbir Singh wrote:
> Add the accounting hooks. The accounting is carried out for RSS and Page
> Cache (unmapped) pages. There is now a common limit and accounting for both.
> The RSS accounting is accounted at page_add_*_rmap() and page_remove_rmap()
> time. Page cache is accounted at add_to_page_cache(),
> __delete_from_page_cache(). Swap cache is also accounted for.
> 
> Each page's meta_page is protected with a bit in page flags, this makes
> handling of race conditions involving simultaneous mappings of a page easier.
> A reference count is kept in the meta_page to deal with cases where a page
> might be unmapped from the RSS of all tasks, but still lives in the page
> cache.
> 
> Signed-off-by: Balbir Singh <balbir@...ux.vnet.ibm.com>
> ---
> 
>  fs/exec.c                  |    1 
>  include/linux/memcontrol.h |   11 +++
>  include/linux/page-flags.h |    3 +
>  mm/filemap.c               |    8 ++
>  mm/memcontrol.c            |  132 ++++++++++++++++++++++++++++++++++++++++++++-
>  mm/memory.c                |   22 +++++++
>  mm/migrate.c               |    6 ++
>  mm/page_alloc.c            |    3 +
>  mm/rmap.c                  |    2 
>  mm/swap_state.c            |    8 ++
>  mm/swapfile.c              |   40 +++++++------
>  11 files changed, 218 insertions(+), 18 deletions(-)
> 

[snip]

> diff -puN mm/migrate.c~mem-control-accounting mm/migrate.c
> --- linux-2.6.22-rc6/mm/migrate.c~mem-control-accounting	2007-07-04 15:05:27.000000000 -0700
> +++ linux-2.6.22-rc6-balbir/mm/migrate.c	2007-07-04 15:05:27.000000000 -0700
> @@ -28,6 +28,7 @@
>  #include <linux/mempolicy.h>
>  #include <linux/vmalloc.h>
>  #include <linux/security.h>
> +#include <linux/memcontrol.h>
> 
>  #include "internal.h"
> 
> @@ -157,6 +158,11 @@ static void remove_migration_pte(struct 
>   		return;
>   	}
> 
> +	if (mem_container_charge(page, mm)) {

Minor correction.  The above line should be

if (mem_container_charge(new, mm)) {

to avoid compilation error.

--Vaidy

[snip]
-
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