[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [0/6] intro

2007-10-09 Thread KAMEZAWA Hiroyuki
Hi, Balbir-san This is a patch set against memory cgroup I have now. Reflected comments I got. = [1] charge refcnt fix patch - avoid charging against a page which is being uncharged. [2] fix-err-handling patch - remove unnecesary unlock_page_cgroup()

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [1/6] fix refcnt race in charge/uncharge

2007-10-09 Thread KAMEZAWA Hiroyuki
. This patch add a test at charging to verify page_cgroup's refcnt is greater than 0. If not, unlock and retry. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] mm/memcontrol.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: linux-2.6.23-rc8-mm2/mm/memcontrol.c

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [2/6] fix err handling in charging

2007-10-09 Thread KAMEZAWA Hiroyuki
This unlock_page_cgroup() is unnecessary. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] mm/memcontrol.c |2 -- 1 file changed, 2 deletions(-) Index: linux-2.6.23-rc8-mm2/mm/memcontrol.c === --- linux-2.6.23-rc8-mm2.orig

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [4/6] avoid handling !LRU page in mem_cgroup_isolate_pages

2007-10-09 Thread KAMEZAWA Hiroyuki
/migration. __isolate_lru_page() doesn't moves page !PageLRU pages, then, it will be safe to avoid touching the page and its page_cgroup. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] mm/memcontrol.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) Index: devel-2.6.23

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [5/6] memory cgroup and migration fix

2007-10-09 Thread KAMEZAWA Hiroyuki
: - reflected comments. - divided a patche to !PageLRU patch and migration patch. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] include/linux/memcontrol.h | 19 +++ mm/memcontrol.c| 43 +++ mm/migrate.c

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [6/6] add force reclaim interface

2007-10-09 Thread KAMEZAWA Hiroyuki
cgroup successfully. Tested and worked well on x86_64/fake-NUMA system. Changelog: - added a new interface force_relcaim. - changes spin_lock to spin_lock_irqsave(). Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] mm/memcontrol.c | 79

[Devel] [PATCH][for -mm] Fix and Enhancements for memory cgroup [3/6] add helper function for page_cgroup

2007-10-09 Thread KAMEZAWA Hiroyuki
This patch adds follwoing functions. - clear_page_cgroup(page, pc) - page_cgroup_assign_new_page_group(page, pc) Mainly for cleaunp. A manner check page-cgroup again after lock_page_cgroup() is implemented in straight way. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] mm

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [3/6] add helper function for page_cgroup

2007-10-09 Thread KAMEZAWA Hiroyuki
On Tue, 09 Oct 2007 16:39:48 +0530 Balbir Singh [EMAIL PROTECTED] wrote: +static inline int +page_cgroup_assign_new_page_cgroup(struct page *page, struct page_cgroup *pc) +{ + int ret = 0; + + lock_page_cgroup(page); + if (!page_get_page_cgroup(page)) +

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [1/6] fix refcnt race in charge/uncharge

2007-10-09 Thread KAMEZAWA Hiroyuki
On Wed, 10 Oct 2007 07:31:38 +0900 (JST) [EMAIL PROTECTED] (YAMAMOTO Takashi) wrote: - atomic_inc(pc-ref_cnt); - goto done; + if (unlikely(!atomic_inc_not_zero(pc-ref_cnt))) { + /* this page is under being uncharge ? */ +

[Devel] Re: [PATCH][for -mm] Fix and Enhancements for memory cgroup [3/6] add helper function for page_cgroup

2007-10-09 Thread KAMEZAWA Hiroyuki
On Tue, 9 Oct 2007 20:26:42 +0900 KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: + */ + if (clear_page_cgroup(page, pc) == pc) { OK.. so we've come so far and seen that pc has changed underneath us, what do we do with this pc? Hmm... How about

[Devel] [BUGFIX][RFC][PATCH][only -mm] FIX memory leak in memory cgroup vs. page migration [0/1]

2007-10-02 Thread KAMEZAWA Hiroyuki
Current implementation of memory cgroup controller does following in migration. 1. uncharge when unmapped. 2. charge again when remapped. Consider migrate a page from OLD to NEW. In following case, memory (for page_cgroup) will leak. 1. charge OLD page as page-cache. (charge = 1 2. A process

[Devel] Re: [BUGFIX][RFC][PATCH][only -mm] FIX memory leak in memory cgroup vs. page migration [1/1] fix page migration under memory contoller

2007-10-02 Thread KAMEZAWA Hiroyuki
mem_cgroup_isolate_pages() igonres !PageLRU pages. Tested and worked well in ia64/NUMA box. Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] --- include/linux/memcontrol.h | 22 +++ mm/memcontrol.c| 62 ++--- mm/migrate.c | 13

[Devel] [BUGFIX][RFC][PATCH][only -mm] FIX memory leak in memory cgroup vs. page migration [2/1] additional patch for migrate page/memory cgroup

2007-10-02 Thread KAMEZAWA Hiroyuki
by mem_cgroup_prepare_migration(). - move mem_cgroup_prepare_migration() after goto: Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] Index: linux-2.6.23-rc8-mm2/mm/memcontrol.c === --- linux-2.6.23-rc8-mm2.orig/mm/memcontrol.c +++ linux

[Devel] Re: [RFC}[PATCH] forced uncharge for successful rmdir.

2007-09-30 Thread KAMEZAWA Hiroyuki
Hi, thank you for review. On Mon, 01 Oct 2007 09:46:02 +0530 Balbir Singh [EMAIL PROTECTED] wrote: @@ -424,17 +424,80 @@ void mem_cgroup_uncharge(struct page_cgr if (atomic_dec_and_test(pc-ref_cnt)) { page = pc-page; lock_page_cgroup(page); - mem =

[Devel] Re: Unable to remove control groups on 2.6.23-rc8-mm1

2007-09-26 Thread KAMEZAWA Hiroyuki
-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] --- include/linux/memcontrol.h | 13 - mm/memcontrol.c| 113 + mm/vmscan.c| 16 +- 3 files changed, 140 insertions(+), 2 deletions(-) Index: linux-2.6.23-rc8-mm1/mm/memcontrol.c

[Devel] Re: Unable to remove control groups on 2.6.23-rc8-mm1

2007-09-26 Thread KAMEZAWA Hiroyuki
On Wed, 26 Sep 2007 08:46:20 -0700 Badari Pulavarty [EMAIL PROTECTED] wrote: On Wed, 2007-09-26 at 18:14 +0900, KAMEZAWA Hiroyuki wrote: This is an experimental patch for drop pages in empty cgroup. comments ? Hmm.. Patch doesn't seems to help :( elm3b155:/dev/cgroup/xxx # cat

[Devel] [RFC][PATCH] allow unlimited limit value.

2007-09-25 Thread KAMEZAWA Hiroyuki
PROTECTED] kamezawa]# cat /opt/cgroup/memory.limit_in_bytes unlimited Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] include/linux/res_counter.h |1 + kernel/res_counter.c| 11 --- 2 files changed, 9 insertions(+), 3 deletions(-) Index: linux-2.6.23-rc8-mm1/include/linux

[Devel] Re: [RFC][PATCH] allow unlimited limit value.

2007-09-25 Thread KAMEZAWA Hiroyuki
On Tue, 25 Sep 2007 16:19:18 +0530 Balbir Singh [EMAIL PROTECTED] wrote: Hi, Kamezawa-San, Hi, Your changes make sense, but not CLUI (Command Line Usage) sense. 1. The problem is that when we mix strings with numbers, tools that parse/use get confused and complicated yes, maybe. 2.

[Devel] Re: [RFC][PATCH] allow unlimited limit value.

2007-09-25 Thread KAMEZAWA Hiroyuki
On Tue, 25 Sep 2007 19:14:53 +0400 Pavel Emelyanov [EMAIL PROTECTED] wrote: KAMEZAWA Hiroyuki wrote: On Tue, 25 Sep 2007 17:34:00 +0400 Pavel Emelyanov [EMAIL PROTECTED] wrote: Well, no container may have the ULLMAX (or what is it?) bytes touched/allocated :) So I don't see any need

[Devel] Re: [PATCH] Hookup group-scheduler with task container infrastructure

2007-09-18 Thread KAMEZAWA Hiroyuki
On Mon, 10 Sep 2007 22:40:49 +0530 Srivatsa Vaddagiri [EMAIL PROTECTED] wrote: + tg-cfs_rq = kzalloc(sizeof(cfs_rq) * num_possible_cpus(), GFP_KERNEL); + if (!tg-cfs_rq) + goto err; + tg-se = kzalloc(sizeof(se) * num_possible_cpus(), GFP_KERNEL); + if (!tg-se) +

[Devel] problem with ZONE_MOVABLE.

2007-09-13 Thread KAMEZAWA Hiroyuki
) Signed-off-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED] --- mm/vmscan.c |9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) Index: linux-2.6.23-rc4-mm1.bak/mm/vmscan.c === --- linux-2.6.23-rc4-mm1.bak.orig/mm/vmscan.c +++ linux

[Devel] Re: [RFC][PATCH 0/3] Kernel memory accounting container (v2)

2007-09-13 Thread KAMEZAWA Hiroyuki
On Thu, 13 Sep 2007 13:11:35 +0400 Pavel Emelyanov [EMAIL PROTECTED] wrote: First of all - why do we need this kind of control. The major pros is that kernel memory control protects the system from DoS attacks by processes that live in container. As our experience shows many exploits simply

[Devel] Re: [RFC] [PATCH] memory controller statistics

2007-09-06 Thread KAMEZAWA Hiroyuki
Hi, On Fri, 7 Sep 2007 12:39:42 +0900 (JST) [EMAIL PROTECTED] (YAMAMOTO Takashi) wrote: +enum mem_container_stat_index { + /* + * for MEM_CONTAINER_TYPE_ALL, usage == pagecache + rss + */ + MEMCONT_STAT_PAGECACHE, + MEMCONT_STAT_RSS, + + /* + * redundant;

[Devel] Re: [-mm PATCH] Memory controller improve user interface

2007-08-29 Thread KAMEZAWA Hiroyuki
On Thu, 30 Aug 2007 04:07:11 +0530 Balbir Singh [EMAIL PROTECTED] wrote: 1. Several people recommended it 2. Herbert mentioned that they've moved to that interface and it was working fine for them. I have no strong opinion. But how about Mega bytes ? (too big ?) There will be no rounding

[Devel] Re: [PATCH] Memory controller Add Documentation

2007-08-23 Thread KAMEZAWA Hiroyuki
Thank you for documentaion. How about adding following topics ? - Benefit and Purpose. When this function help a user. - What is accounted as RSS. - What is accounted as page-cache. - What are not accoutned now. - When a page is accounted (charged.) - about mem_control_type - When a user can

[Devel] Re: [-mm PATCH 0/9] Memory controller introduction (v4)

2007-08-07 Thread KAMEZAWA Hiroyuki
On Sat, 28 Jul 2007 01:39:37 +0530 Balbir Singh [EMAIL PROTECTED] wrote: At OLS, the resource management BOF, it was discussed that we need to manage RSS and unmapped page cache together. This patchset is a step towards that Can I make a question ? Why limiting RSS instead of # of used pages

[Devel] Re: containers development plans (July 10 version)

2007-07-10 Thread KAMEZAWA Hiroyuki
On Tue, 10 Jul 2007 16:39:43 -0500 Serge E. Hallyn [EMAIL PROTECTED] wrote: In the list of stakeholders, I try to guess based on past comments and contributions what *general* area they are most likely to contribute in. I may try to narrow those down later, but am just trying to get something

[Devel] Re: [RFC][PATCH][3/4] Add reclaim support

2007-02-19 Thread KAMEZAWA Hiroyuki
On Mon, 19 Feb 2007 12:20:42 +0530 Balbir Singh [EMAIL PROTECTED] wrote: +int memctlr_mm_overlimit(struct mm_struct *mm, void *sc_cont) +{ + struct container *cont; + struct memctlr *mem; + long usage, limit; + int ret = 1; + + if (!sc_cont) + goto out; +

<    3   4   5   6   7   8