All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>, Pavel Emelianov <xemul@openvz.org>,
	Linux Containers <containers@lists.osdl.org>,
	Paul Menage <menage@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [-mm PATCH 4/7] Memory controller memory accounting
Date: Fri, 06 Jul 2007 00:16:04 +0530	[thread overview]
Message-ID: <468D3C6C.8060900@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070704222203.17702.37327.sendpatchset@balbir-laptop>



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@linux.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]

  reply	other threads:[~2007-07-05 18:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04 22:21 [-mm PATCH 0/7] Memory controller introduction Balbir Singh
2007-07-04 22:21 ` [-mm PATCH 1/7] Memory controller resource counters Balbir Singh
2007-07-04 22:21 ` [-mm PATCH 2/7] Memory controller containers setup Balbir Singh
2007-07-04 22:21 ` [-mm PATCH 3/7] Memory controller accounting setup Balbir Singh
2007-07-04 22:22 ` [-mm PATCH 4/7] Memory controller memory accounting Balbir Singh
2007-07-05 18:46   ` Vaidyanathan Srinivasan [this message]
2007-07-05 20:03     ` Balbir Singh
2007-07-04 22:22 ` [-mm PATCH 5/7] Memory controller task migration Balbir Singh
2007-07-04 22:22 ` [-mm PATCH 6/7] Memory controller add per container LRU and reclaim Balbir Singh
2007-07-04 22:22 ` [-mm PATCH 7/7] Memory controller OOM handling Balbir Singh
2007-07-05  9:14 ` [-mm PATCH 0/7] Memory controller introduction Pavel Emelianov
2007-07-05 14:32   ` Balbir Singh
2007-07-06 13:14   ` Peter Zijlstra
2007-07-06 14:06     ` Pavel Emelianov
2007-07-06 15:34     ` Balbir Singh
  -- strict thread matches above, loose matches on Subject: below --
2007-07-04 22:12 Balbir Singh
2007-07-04 22:13 ` [-mm PATCH 4/7] Memory controller memory accounting Balbir Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=468D3C6C.8060900@linux.vnet.ibm.com \
    --to=svaidy@linux.vnet.ibm.com \
    --cc=akpm@osdl.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.