[Devel] Re: [PATCH 2/2] Make res_counter hierarchical

2008-03-13 Thread Pavel Emelyanov
YAMAMOTO Takashi wrote: @@ -36,10 +37,26 @@ int res_counter_charge(struct res_counter *counter, unsigned long val) { int ret; unsigned long flags; +struct res_counter *c, *unroll_c; + +local_irq_save(flags); +for (c = counter; c != NULL; c = c-parent) { +

[Devel] Re: [PATCH] Add a 'trigger' callback on struct cftype.

2008-03-13 Thread Pavel Emelyanov
Pavel Emelyanov wrote: Paul Menage wrote: On Tue, Mar 11, 2008 at 9:13 AM, Pavel Emelyanov [EMAIL PROTECTED] wrote: --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -243,7 +243,7 @@ struct cftype { */ int (*write_s64) (struct cgroup *cgrp, struct cftype *cft,

[Devel] [PATCH 0/3] Implement triggers for control groups.

2008-03-13 Thread Pavel Emelyanov
Hi, guys. This is the final set I'm going to send to Andrew. It has a new feature - fail counter reset - and splitted, so I send it for a final review (maybe some Acked-by-s ;) ) before sending to Andrew. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]

[Devel] [PATCH 3/3] Implement failcounter reset

2008-03-13 Thread Pavel Emelyanov
Merge two resets into one mem_cgroup_reset() function to demonstrate how multiplexing work. Besides, I have plans to move the files, that correspond to res_counter to the res_counter.c file and somehow import them into controller. I don't know how to make it gracefully yet, but merging resets of

[Devel] [PATCH 2/3] Use triggers in force_empty and max_usage files

2008-03-13 Thread Pavel Emelyanov
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- mm/memcontrol.c | 21 ++--- 1 files changed, 6 insertions(+), 15 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c27141d..d3ec3e3 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -868,27 +868,18 @@

[Devel] [PATCH 1/3] Add the trigger callback to struct cftype

2008-03-13 Thread Pavel Emelyanov
Trigger callback can be used to receive a kick-up from the user space. The string written is ignored. The cftype-private is used for multiplexing events. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- include/linux/cgroup.h |8 kernel/cgroup.c|4 2 files

[Devel] Re: [PATCH 1/3] Add the trigger callback to struct cftype

2008-03-13 Thread Paul Menage
On Thu, Mar 13, 2008 at 4:36 AM, Pavel Emelyanov [EMAIL PROTECTED] wrote: Trigger callback can be used to receive a kick-up from the user space. The string written is ignored. The cftype-private is used for multiplexing events. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] Acked-by:

[Devel] accessing nonexistent /proc/tid/

2008-03-13 Thread Miklos Szeredi
Jean-Pierre noticed, that it's possible to access any task through /proc/tid/, not just the thread group leader. Is this intentional? I can't find it documented anywhere, but it's definitely a useful feature. So maybe it's worth making it officially part of the kernel interface, and adding a

[Devel] Re: [RFC][PATCH 4/4] PID: use the target ID specified in procfs

2008-03-13 Thread Eric W. Biederman
Nadia Derbey [EMAIL PROTECTED] writes: Eric W. Biederman wrote: Nadia Derbey [EMAIL PROTECTED] writes: A couple of weeks ago, a discussion has started after Pierre's proposal for a new syscall to change an ipc id (see thread http://lkml.org/lkml/2008/1/29/209). Oren's suggestion was to force

[Devel] Re: [RFC][PATCH 4/4] PID: use the target ID specified in procfs

2008-03-13 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Nadia Derbey [EMAIL PROTECTED] writes: Eric W. Biederman wrote: Nadia Derbey [EMAIL PROTECTED] writes: A couple of weeks ago, a discussion has started after Pierre's proposal for a new syscall to change an ipc id (see thread

[Devel] Re: [RFC][PATCH 4/4] PID: use the target ID specified in procfs

2008-03-13 Thread Oren Laadan
Eric W. Biederman wrote: Nadia Derbey [EMAIL PROTECTED] writes: Eric W. Biederman wrote: Nadia Derbey [EMAIL PROTECTED] writes: A couple of weeks ago, a discussion has started after Pierre's proposal for a new syscall to change an ipc id (see thread http://lkml.org/lkml/2008/1/29/209).

[Devel] Re: [PATCH 1/3] res_counter: introduce res_counter_write_u64()

2008-03-13 Thread Li Zefan
KAMEZAWA Hiroyuki wrote: On Tue, 11 Mar 2008 19:08:39 +0900 Li Zefan [EMAIL PROTECTED] wrote: This function can be used to assign the value of a resource counter member. Why don't you make this function to do the same work as res_counter_write() ? You mean to deal with write strategy? We

[Devel] Re: [PATCH 0/3] Implement triggers for control groups.

2008-03-13 Thread KAMEZAWA Hiroyuki
On Thu, 13 Mar 2008 14:34:39 +0300 Pavel Emelyanov [EMAIL PROTECTED] wrote: Hi, guys. This is the final set I'm going to send to Andrew. It has a new feature - fail counter reset - and splitted, so I send it for a final review (maybe some Acked-by-s ;) ) before sending to Andrew.