[Devel] [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
Hi. I updated my swapcgroup patch. Major changes from previous version(*1): - Rebased on 2.6.26-rc2-mm1 + KAMEZAWA-san's performance improvement patchset v4. - Implemented as a add-on to memory cgroup. So, there is no need to add a new member to page_cgroup now. - (NEW)Modified

[Devel] [PATCH 1/4] swapcgroup: add cgroup files

2008-05-22 Thread Daisuke Nishimura
This patch add cgroup files(and a member to struct mem_cgroup) for swapcgroup. The files to be added are: - memory.swap_usage_in_bytes - memory.swap_max_usage_in_bytes - memory.swap_limit_in_bytes - memory.swap_failcnt The meaning of those files are the same as memory cgroup. Signed-off-by:

[Devel] [PATCH 2/4] swapcgroup: add member to swap_info_struct for cgroup

2008-05-22 Thread Daisuke Nishimura
This patch add a member to swap_info_struct for cgroup. This member, array of pointers to mem_cgroup, is used to remember to which cgroup each swap entries are charged. The memory for this array of pointers is allocated on swapon, and freed on swapoff. Signed-off-by: Daisuke Nishimura [EMAIL

[Devel] [PATCH 3/4] swapcgroup: implement charge/uncharge

2008-05-22 Thread Daisuke Nishimura
This patch implements charge and uncharge of swapcgroup. - what will be charged ? charge the number of swap entries in bytes. - when to charge/uncharge ? charge at get_swap_entry(), and uncharge at swap_entry_free(). - to what group charge the swap entry ? To determine to what mem_cgroup

[Devel] [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread Daisuke Nishimura
This patch modifies vm_swap_full() to calculate the rate of swap usage per cgroup. The purpose of this change is to free freeable swap caches (that is, swap entries) per cgroup, so that swap_cgroup_charge() fails less frequently. I think I can free freeable swap caches more agressively with one

[Devel] Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread YAMAMOTO Takashi
@@ -1892,3 +1892,36 @@ int valid_swaphandles(swp_entry_t entry, unsigned long *offset) *offset = ++toff; return nr_pages? ++nr_pages: 0; } + +#ifdef CONFIG_CGROUP_SWAP_RES_CTLR +int swap_cgroup_vm_swap_full(struct page *page) +{ + int ret; + struct swap_info_struct

[Devel] Re: [PATCH -mm] remove node_ prefix_from ns subsystem

2008-05-22 Thread Paul Menage
On Wed, May 21, 2008 at 10:06 PM, Andrew Morton [EMAIL PROTECTED] wrote: --- 2.6.26-rc2-mm1.orig/kernel/cgroup.c +++ 2.6.26-rc2-mm1/kernel/cgroup.c @@ -2903,7 +2903,7 @@ int cgroup_clone(struct task_struct *tsk cg = tsk-cgroups; parent = task_cgroup(tsk, subsys-subsys_id); -

[Devel] Re: [PATCH 2/4] swapcgroup: add member to swap_info_struct for cgroup

2008-05-22 Thread KAMEZAWA Hiroyuki
On Thu, 22 May 2008 15:18:51 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: This patch add a member to swap_info_struct for cgroup. This member, array of pointers to mem_cgroup, is used to remember to which cgroup each swap entries are charged. The memory for this array of pointers is

[Devel] Re: [PATCH 3/4] swapcgroup: implement charge/uncharge

2008-05-22 Thread KAMEZAWA Hiroyuki
On Thu, 22 May 2008 15:20:05 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: +#ifdef CONFIG_CGROUP_SWAP_RES_CTLR +int swap_cgroup_charge(struct page *page, + struct swap_info_struct *si, + unsigned long offset) +{ + int ret; + struct

[Devel] Re: [PATCH -mm] remove node_ prefix_from ns subsystem

2008-05-22 Thread Andrew Morton
On Thu, 22 May 2008 00:11:56 -0700 Paul Menage [EMAIL PROTECTED] wrote: On Wed, May 21, 2008 at 10:06 PM, Andrew Morton [EMAIL PROTECTED] wrote: --- 2.6.26-rc2-mm1.orig/kernel/cgroup.c +++ 2.6.26-rc2-mm1/kernel/cgroup.c @@ -2903,7 +2903,7 @@ int cgroup_clone(struct task_struct *tsk

[Devel] Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread KAMEZAWA Hiroyuki
On Thu, 22 May 2008 15:22:24 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: + mem = p-memcg[swp_offset(entry)]; + usage = swap_cgroup_read_usage(mem) / PAGE_SIZE; + limit = swap_cgroup_read_limit(mem) / PAGE_SIZE; + limit = (limit total_swap_pages) ? limit :

[Devel] Re: [PATCH -mm] remove node_ prefix_from ns subsystem

2008-05-22 Thread Cedric Le Goater
Andrew Morton wrote: On Thu, 22 May 2008 00:11:56 -0700 Paul Menage [EMAIL PROTECTED] wrote: On Wed, May 21, 2008 at 10:06 PM, Andrew Morton [EMAIL PROTECTED] wrote: --- 2.6.26-rc2-mm1.orig/kernel/cgroup.c +++ 2.6.26-rc2-mm1/kernel/cgroup.c @@ -2903,7 +2903,7 @@ int cgroup_clone(struct

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread KAMEZAWA Hiroyuki
On Thu, 22 May 2008 15:13:41 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: Hi. I updated my swapcgroup patch. seems good in general. Major changes from previous version(*1): - Rebased on 2.6.26-rc2-mm1 + KAMEZAWA-san's performance improvement patchset v4. - Implemented as a

[Devel] Re: [PATCH -mm] remove node_ prefix_from ns subsystem

2008-05-22 Thread Andrew Morton
On Thu, 22 May 2008 09:36:23 +0200 Cedric Le Goater [EMAIL PROTECTED] wrote: What is the reason for making this change? the 'node_' prefix really is superfluous and misleading. what's a node ? For gawd's sake guys. I've asked three times and now I'm getting rhetorical questions for

[Devel] Re: [PATCH -mm] remove node_ prefix_from ns subsystem

2008-05-22 Thread Paul Menage
Hi Andrew, On Thu, May 22, 2008 at 1:10 AM, Andrew Morton [EMAIL PROTECTED] wrote: What the change is, why it is being made, what the user-visible presentation is, what the impact upon users is, why we think it won't be a problem, etc? The stuff which should have been right there from day

[Devel] Re: [PATCH -mm] remove node_ prefix_from ns subsystem

2008-05-22 Thread Andrew Morton
On Thu, 22 May 2008 01:23:35 -0700 Paul Menage [EMAIL PROTECTED] wrote: Hi Andrew, On Thu, May 22, 2008 at 1:10 AM, Andrew Morton [EMAIL PROTECTED] wrote: What the change is, why it is being made, what the user-visible presentation is, what the impact upon users is, why we think it

[Devel] Re: [PATCH 2/4] swapcgroup: add member to swap_info_struct for cgroup

2008-05-22 Thread Daisuke Nishimura
Hi. On 2008/05/22 16:23 +0900, KAMEZAWA Hiroyuki wrote: On Thu, 22 May 2008 15:18:51 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: This patch add a member to swap_info_struct for cgroup. This member, array of pointers to mem_cgroup, is used to remember to which cgroup each swap entries

[Devel] Re: [PATCH -mm] remove node_ prefix_from ns subsystem

2008-05-22 Thread Cedric Le Goater
Andrew Morton wrote: On Thu, 22 May 2008 01:23:35 -0700 Paul Menage [EMAIL PROTECTED] wrote: Hi Andrew, On Thu, May 22, 2008 at 1:10 AM, Andrew Morton [EMAIL PROTECTED] wrote: What the change is, why it is being made, what the user-visible presentation is, what the impact upon users is,

[Devel] Re: [PATCH 2/4] swapcgroup: add member to swap_info_struct for cgroup

2008-05-22 Thread KAMEZAWA Hiroyuki
On Thu, 22 May 2008 17:46:54 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: == #ifdef CONFIG_CGROUP_SWAP_RES_CTR void swap_cgroup_init_memcg(p, memcg) { do something. } #else void swap_cgroup_init_memcg(p, memcg) { } #endif == I think

[Devel] Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread Daisuke Nishimura
Hi, On 2008/05/22 17:00 +0900, KOSAKI Motohiro wrote: Hi, +#ifndef CONFIG_CGROUP_SWAP_RES_CTLR /* Swap 50% full? Release swapcache more aggressively.. */ -#define vm_swap_full() (nr_swap_pages*2 total_swap_pages) +#define vm_swap_full(page) (nr_swap_pages*2 total_swap_pages) +#else

[Devel] Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread Daisuke Nishimura
Hi, On 2008/05/22 15:45 +0900, YAMAMOTO Takashi wrote: @@ -1892,3 +1892,36 @@ int valid_swaphandles(swp_entry_t entry, unsigned long *offset) *offset = ++toff; return nr_pages? ++nr_pages: 0; } + +#ifdef CONFIG_CGROUP_SWAP_RES_CTLR +int swap_cgroup_vm_swap_full(struct page

[Devel] Re: [RFC][v2][patch 0/12][CFQ-cgroup]Yet another I/O bandwidth controlling subsystem for CGroups based on CFQ

2008-05-22 Thread Ryo Tsuruta
Hi Uchida-san, I realized that the benchmark results which I posted on Apr 25 had some problems with the testing environment. From: Ryo Tsuruta [EMAIL PROTECTED] Subject: Re: [RFC][v2][patch 0/12][CFQ-cgroup]Yet another I/O bandwidth controlling subsystem for CGroups based on CFQ Date:

[Devel] [PATCH] nf_conntrack: fix error path unwind in nf_conntrack_expect_init()

2008-05-22 Thread Alexey Dobriyan
Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] --- net/netfilter/nf_conntrack_expect.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c @@ -587,10 +587,10 @@ int __init

[Devel] Re: [PATCH] nf_conntrack: fix error path unwind in nf_conntrack_expect_init()

2008-05-22 Thread Patrick McHardy
Alexey Dobriyan wrote: Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] --- net/netfilter/nf_conntrack_expect.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks Alexey. I'll also push this to -stable. ___ Devel mailing

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Balbir Singh
Daisuke Nishimura wrote: Hi. I updated my swapcgroup patch. Major changes from previous version(*1): - Rebased on 2.6.26-rc2-mm1 + KAMEZAWA-san's performance improvement patchset v4. - Implemented as a add-on to memory cgroup. So, there is no need to add a new member to page_cgroup

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
On 2008/05/22 16:44 +0900, KAMEZAWA Hiroyuki wrote: On Thu, 22 May 2008 15:13:41 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: Hi. I updated my swapcgroup patch. seems good in general. Thanks :-) ToDo: - handle force_empty. Without this, we can do rmdir() against cgroup with

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Rik van Riel
On Thu, 22 May 2008 15:13:41 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: I updated my swapcgroup patch. I do not understand why this is useful. With the other cgroup resource controllers, once a process group reaches its limit, it is limited or punished in some way. For example, when it

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
(sorry, I sent the previous mail before completing it) On 2008/05/23 11:10 +0900, Daisuke Nishimura wrote: On 2008/05/22 16:44 +0900, KAMEZAWA Hiroyuki wrote: (snip) - make it possible for users to select if they use this feature or not, and avoid overhead for users not using this

[Devel] RE: [RFC][v2][patch 0/12][CFQ-cgroup]Yet another I/O bandwidth controlling subsystem for CGroups based on CFQ

2008-05-22 Thread Satoshi UCHIDA
Hi, Tsuruta-san, Thanks for your test. Uchida-san said, In the test #2 and #3, did you use direct write? I guess you have used the non-direct write I/O (using cache). I answered Yes, but actually I did not use direct write I/O, because I ran these tests on Xen-HVM. Xen-HVM backend

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread KAMEZAWA Hiroyuki
On Thu, 22 May 2008 22:26:55 -0400 Rik van Riel [EMAIL PROTECTED] wrote: Even worse is that a cgroup has NO CONTROL over how much of its memory is kept in RAM and how much is swapped out. Could you explain NO CONTROL ? cgroup has LRU 'how mucch memory should be swapped out from memory' is

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Rik van Riel
On Fri, 23 May 2008 12:10:27 +0900 KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: On Thu, 22 May 2008 22:26:55 -0400 Rik van Riel [EMAIL PROTECTED] wrote: Even worse is that a cgroup has NO CONTROL over how much of its memory is kept in RAM and how much is swapped out. Could you explain NO

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Balbir Singh
KAMEZAWA Hiroyuki wrote: On Thu, 22 May 2008 22:26:55 -0400 Rik van Riel [EMAIL PROTECTED] wrote: Even worse is that a cgroup has NO CONTROL over how much of its memory is kept in RAM and how much is swapped out. We used to have a control on the swap cache pages as well, but their

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
Hi. On 2008/05/23 6:27 +0900, Balbir Singh wrote: Daisuke Nishimura wrote: Hi. I updated my swapcgroup patch. Major changes from previous version(*1): - Rebased on 2.6.26-rc2-mm1 + KAMEZAWA-san's performance improvement patchset v4. - Implemented as a add-on to memory cgroup. So,

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Balbir Singh
KOSAKI Motohiro wrote: One option is to limit the virtual address space usage of the cgroup to ensure that swap usage of a cgroup will *not* exceed the specified limit. Along with a good swap controller, it should provide good control over the cgroup's memory usage. unfortunately, it

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread KAMEZAWA Hiroyuki
On Fri, 23 May 2008 10:21:04 +0530 Balbir Singh [EMAIL PROTECTED] wrote: KOSAKI Motohiro wrote: One option is to limit the virtual address space usage of the cgroup to ensure that swap usage of a cgroup will *not* exceed the specified limit. Along with a good swap controller, it