skipping calls to offline_css() and
> css_free() in cgroup_unload_subsys() if there is no css, and freeing css
> in cgroup_load_subsys() on online_css() failure.
>
> Signed-off-by: Vladimir Davydov
I don't have strong preference on wh
> cgroup_subsys *ss)
> }
> write_unlock(&css_set_lock);
>
> - ret = online_css(css);
> - if (ret)
> - goto err_unload;
> -
Moving online_css() upwards should be fine.
Acked-by: Li Zefan
> /* success! */
>
On 2013/12/6 5:18, Tejun Heo wrote:
> Hello, Vladimir.
>
> Thanks a lot for the report and fix; however, I really wanna make sure
> that only online css's become visible, so I wrote up a different fix.
> Can you please test this one?
>
Oh, I spotted this bug when reviewing a bug fix months ago.
> +static void disarm_static_keys(struct mem_cgroup *memcg)
> +{
> +#ifdef CONFIG_INET
> + if (memcg->tcp_mem.cg_proto.activated)
> + static_key_slow_dec(&memcg_socket_limit_enabled);
> +#endif
> +}
Move this inside the ifdef/endif below ?
Otherwise I think you'll get compile er
p, and the cgroup is declared
>>>dead (cgroup_is_removed() == true)
>>>
>>> [v2: don't cgroup_lock the freezer and blkcg ]
>>>
>>> Signed-off-by: Glauber Costa
>>> CC: Tejun Heo
>>> CC: Li Zefan
>>> CC: Kamezawa Hi
Glauber Costa wrote:
> On 04/19/2012 07:57 PM, Tejun Heo wrote:
>> On Thu, Apr 19, 2012 at 07:49:17PM -0300, Glauber Costa wrote:
>>> Most of the destroy functions are only doing very simple things
>>> like freeing memory.
>>>
>>> The ones who goes through lists and such, already use its own
>>> l
Tejun Heo wrote:
> On Thu, Apr 19, 2012 at 07:49:17PM -0300, Glauber Costa wrote:
>> Most of the destroy functions are only doing very simple things
>> like freeing memory.
>>
>> The ones who goes through lists and such, already use its own
>> locking for those.
>>
>> * The cgroup itself won't go
Glauber Costa wrote:
> Hello Tejun,
>
> During your cgroup refactor, I was wondering if you have any plans to get rid
> of the bind() callback that is called when hierarchies are moved?
I planned to remove it long ago, and Paul M agreed. But after some time, I was
trying to make use of it in a
et me know if this is tuned with the idea you had in mind.
> If this is okay, I patch that extracts usage from cpu cgroup data
> in case of comount would follow.
>
> Signed-off-by: Glauber Costa
> CC: Paul Turner
> CC: Li Zefan
> ---
> kernel/cgroup.c |4 ++--
>
22:45, Glauber Costa wrote:
> Those are quite simple bit-testing functions that are
> only used within this file. Not reason for them not to
> be inline.
>
It's better to leave the optimization decision to gcc.
And I've confirmed they are inlined by gcc in my box.
(btw, please add "cgroup" pref
Tejun Heo wrote:
> On Sun, Dec 11, 2011 at 03:45:37PM +0100, Glauber Costa wrote:
>> There is no reason to have a flags field, and then a separate
>> bool field just to indicate if the clone_children flag is set.
>> Make it a flag
>>
>> Signed-off-by: Glauber Costa
>
> Doesn't this change how rem
于 2011年12月13日 23:41, Tejun Heo 写道:
> On Sun, Dec 11, 2011 at 03:45:38PM +0100, Glauber Costa wrote:
>> There is no reason to have a flags field, and then a separate
>> bool field just to indicate if 'none' subsystem were explicitly
>> requested.
>>
>> Make it a flag
>>
>> Signed-off-by: Glauber Cos
> In mem_cgroup_alloc() we currently do either kmalloc() or vmalloc() then
> followed by memset() to zero the memory. This can be more efficiently
> achieved by using kzalloc() and vzalloc().
> There's also one situation where we can use kzalloc_node() - this is
> what's new in this version of t
i Olsa
Normally you should retain reviewed-by and other tags that
you've got previously.
So here again:
Reviewed-by: Li Zefan
___
Containers mailing list
contain...@lists.linux-foundation.org
https://lists.linux-fo
lock_held() condition.
>
> wbr,
> jirka
and this should be excluded from the changelog.
>
>
> Signed-off-by: Jiri Olsa
Reviewed-by: Li Zefan
However a nitpick:
> ---
> include/linux/cgroup.h |1 -
> kernel/cgroup.c|6 ++
> 2 files change
jacob pan wrote:
> On Wed, 09 Feb 2011 11:07:59 +0800
> Li Zefan wrote:
>
>> jacob.jun@linux.intel.com wrote:
>>> From: Jacob Pan
>>>
>>> Freezer subsystem is used to manage batch jobs which can start
>>> stop at the same time. However, so
jacob.jun@linux.intel.com wrote:
> From: Jacob Pan
>
> Freezer subsystem is used to manage batch jobs which can start
> stop at the same time. However, sometime it is desirable to let
> the kernel manage the freezer state automatically with a given
> duty ratio.
> For example, if we want to r
Andrew Morton wrote:
> On Tue, 25 Jan 2011 10:39:48 +0100
> Daniel Lezcano wrote:
>
>> This patch removes the ns_cgroup as suggested in the following thread:
>
> I had this patch queued up in September last year, but dropped it. Why
> did I do that?
Because you wanted to wait for some time for
Al Viro wrote:
> On Fri, Jan 14, 2011 at 12:56:17PM +0800, Li Zefan wrote:
>> Just mount the cgroupfs:
>>
>> # mount -t cgroup -o cpuset xxx /mnt
>> (oops!!)
>>
>> The bug is caused by:
>>
>> =
>> commit 0df6a63f8735a7c8a877878bc215
Just mount the cgroupfs:
# mount -t cgroup -o cpuset xxx /mnt
(oops!!)
The bug is caused by:
=
commit 0df6a63f8735a7c8a877878bc215d4312e41ef81
Author: Al Viro
Date: Tue Dec 21 13:29:29 2010 -0500
switch cgroup
switching it to s_d_op allows to kill the cgroup_lookup() klu
;> [ 85.102009] [] ? sysret_check+0x27/0x62
>> [ 85.102009] [] ? trace_hardirqs_on_caller+0x117/0x13b
>> [ 85.102009] [] ? trace_hardirqs_on_thunk+0x3a/0x3f
>> [ 85.102009] [] ? sys_rmdir+0x11/0x13
>> [ 85.102009] [] ? system_call_fastpath+0x16/0x1b
>&g
David Rientjes wrote:
> On Thu, 30 Dec 2010, Li Zefan wrote:
>
>>> This needs to be done with cgroup_lock() instead of callback_mutex since
>>> the post_clone() callback will store to cs->mems_allowed on
>>> cgroup_clone().
>>>
>> Then cpuset
David Rientjes wrote:
> On Thu, 30 Dec 2010, Li Zefan wrote:
>
>> That's what we did for cpu masks :). See commit
>> 2341d1b6598c7146d64a5050b53a72a5a819617f.
>>
>> I made a patchset to remove on stack cpu masks.
>>
>> What I
David Rientjes wrote:
> On Wed, 29 Dec 2010, Li Zefan wrote:
>
>>> I think it would be appropriate to use a shared nodemask with file scope
>>> whenever you have cgroup_lock() to avoid the unnecessary kmalloc() even
>>> with GFP_KERNEL. Cpusets are traditional
David Rientjes wrote:
> On Mon, 27 Dec 2010, Ben Blum wrote:
>
>>> I'm not sure what the benefit of defining it as a macro would be. You're
>>> defining these statically allocated nodemasks so they have file scope, I
>>> hope (so they can be shared amongst the users who synchronize on
>>> cgro
Provide a usage example, update the bind() callback API, etc.
Signed-off-by: Li Zefan
---
Documentation/cgroups/cgroups.txt | 37 +
1 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/Documentation/cgroups/cgroups.txt
b/Documentation/cgroups
For those subsystems (debug, cpuacct, net_cls and devices),
setting the bindable/unbindable flag is sufficient.
Set freezer subsystem as bindable but not unbindable, because
sub-cgroups' can be in FROZEN state.
Signed-off-by: Li Zefan
---
kernel/cgroup.c |6 +-
k
For now unbindable subsystems should not use css_get/put(), so check
this misuse.
Signed-off-by: Li Zefan
---
include/linux/cgroup.h |7 +--
kernel/cgroup.c|5 +
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux
ags.
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 17 ++
kernel/cgroup.c| 139 +--
2 files changed, 138 insertions(+), 18 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index d8c4e22..17579b2 100644
--- a/incl
one() for newly-created css.
Signed-off-by: Li Zefan
---
include/linux/cgroup.h |5 +
kernel/cgroup.c| 273 ++--
2 files changed, 221 insertions(+), 57 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 63d953
On x86_32, sizeof(struct cgroup_subsys) shrinks from 276 bytes
to 264.
Acked-by: Paul Menage
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ed4ba11
Stephane posted a patchset to add perf_cgroup subsystem, so perf can
be used to monitor all threads belonging to a cgroup.
But if you already mounted a cgroup hierarchy but without perf_cgroup
and the hierarchy has sub-cgroups, you can't bind perf_cgroup to it,
and thus you're not able to use per-
ccmail111 wrote:
> Hi Serge,
>
> Now I cannot move the pid out of the assigned group !
>
Try:
$ sudo echo 580 > tasks
> [host:/dev/cgroup]$ cat cpuset.cpus
> 0
> [host:/dev/cgroup]$ cat cpuset.mems
> 0
> [host:/dev/cgroup]$ cat hello/tasks
> 580
>
> [host:/dev/cgroup]$ echo 580 > tasks
> -b
Paul Menage wrote:
> On Sun, Nov 21, 2010 at 8:06 PM, Colin Cross wrote:
>> The synchronize_rcu call in cgroup_attach_task can be very
>> expensive. All fastpath accesses to task->cgroups that expect
>> task->cgroups not to change already use task_lock() or
>> cgroup_lock() to protect against upd
12:06, Colin Cross wrote:
> The synchronize_rcu call in cgroup_attach_task can be very
> expensive. All fastpath accesses to task->cgroups that expect
> task->cgroups not to change already use task_lock() or
> cgroup_lock() to protect against updates, and, in cgroup.c,
> only the CGROUP_DEBUG file
Ben Gamari wrote:
> I've been trying to configure cgroups and have encountered some very
> strange behavior. In particular, when I follow the instructions in
> Documentation/cgroups/blkio-controller.txt I quickly reach an error,
>
> $ cd /mnt
> $ sudo mkdir -p cgroups/blkio
> $ # Confirm it's not
Paul Menage wrote:
> On Tue, Nov 9, 2010 at 4:52 PM, Li Zefan wrote:
>>> bool active:1;
>>> bool disabled:1;
>>>
>> It won't compile, but unsigned char active:1 will do. ;)
>
> Are you sure? I don't have a buildable kernel tree at the momen
Paul Menage wrote:
> On Sun, Nov 7, 2010 at 9:23 PM, Li Zefan wrote:
>> bool active;
>> bool disabled;
>> ...
>>
>> ?
>>
>> With alignment 5-8 bool values == 8 bytes in 64-bit machine, compared to
>> 4 bytes with the approach this patch takes
Paul Menage wrote:
>> Called when a cgroup subsystem is rebound to a different hierarchy
>> -and root cgroup. Currently this will only involve movement between
>> -the default hierarchy (which never has sub-cgroups) and a hierarchy
>> -that is being created/destroyed (and hence has no sub-cgroups)
Paul Menage wrote:
> On Fri, Oct 22, 2010 at 1:09 AM, Li Zefan wrote:
>> + /*
>> +* Indicate if this subsystem can be bound/unbound to/from a cgroup
>> +* hierarchy which has child cgroups.
>> +*/
>> + unsigned int can_bind:
(Sorry for the delayed reply)
Paul Menage wrote:
> On Fri, Oct 22, 2010 at 1:09 AM, Li Zefan wrote:
>> On x86_32, sizeof(struct cgroup_subsys) shrinks from 276 bytes
>> to 264.
>>
>> Signed-off-by: Li Zefan
>
> Acked-by: Paul Menage
>
> Maybe use &qu
>> +/*
>> + * cgroup_walk_herarchy - iterate through a cgroup hierarchy
>> + * @process_cgroup: callback called on each cgroup in the hierarchy
>> + * @data: will be passed to @process_cgroup
>> + * @top_cgrp: the root cgroup of the hierarchy
>> + *
>> + * For such a hierarchy:
>> + *a1
Matt Helsley wrote:
> On Fri, Oct 22, 2010 at 04:11:41PM +0800, Li Zefan wrote:
>> To make it bindable, we need to thaw all processes when unbinding
>> the freezer subsystem from a cgroup hierarchy.
>>
>> Signed-off-by: Li Zefan
>
> Based on experience using cg
Peter Zijlstra wrote:
> On Fri, 2010-10-22 at 16:09 +0800, Li Zefan wrote:
>> Stephane posted a patchset to add perf_cgroup subsystem, so perf can
>> be used to monitor all threads belonging to a cgroup.
>>
>> But if you already mounted a cgroup hierarchy but wit
Peter Zijlstra wrote:
> On Fri, 2010-10-22 at 16:09 +0800, Li Zefan wrote:
>> For example, we can't decide a cgroup's cpuset.mems and
>> cpuset.cpus automatically, so cpuset is not bindable.
>
> You mean to say that you cannot add cpuset to an existing hierarchy
&
Li Zefan wrote:
> KAMEZAWA Hiroyuki wrote:
>> On Fri, 22 Oct 2010 16:12:25 +0800
>> Li Zefan wrote:
>>
>>> Provide a usage example, and update the bind() callback API.
>>>
>>> Signed-off-by: Li Zefan
>>> ---
>>> Documentation/
KAMEZAWA Hiroyuki wrote:
> On Fri, 22 Oct 2010 16:12:25 +0800
> Li Zefan wrote:
>
>> Provide a usage example, and update the bind() callback API.
>>
>> Signed-off-by: Li Zefan
>> ---
>> Documentation/cgroups/cgroups.txt | 26 +-
&
Provide a usage example, and update the bind() callback API.
Signed-off-by: Li Zefan
---
Documentation/cgroups/cgroups.txt | 26 +-
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/Documentation/cgroups/cgroups.txt
b/Documentation/cgroups/cgroups.txt
For now bindable subsystems should not use css_get/put(), so warn
on this misuse.
Signed-off-by: Li Zefan
---
include/linux/cgroup.h |7 +--
kernel/cgroup.c|3 +++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
To make it bindable, we need to thaw all processes when unbinding
the freezer subsystem from a cgroup hierarchy.
Signed-off-by: Li Zefan
---
include/linux/cgroup.h |3 ++-
kernel/cgroup.c | 22 --
kernel/cgroup_freezer.c | 19 +--
3 files
For those subsystems (debug, cpuacct, net_cls and devices),
setting the can_bind flag is sufficient.
Signed-off-by: Li Zefan
---
kernel/cgroup.c |1 +
kernel/sched.c |1 +
net/sched/cls_cgroup.c |1 +
security/device_cgroup.c |1 +
4 files changed, 4
assume cpuacct is bindable, and we add cpuacct to the hierarchy)
# mount -o remount,cpuset,cpuacct xxx /mnt
Signed-off-by: Li Zefan
---
include/linux/cgroup.h |5 +
kernel/cgroup.c| 225 ++-
2 files changed, 187 insertions(+), 43 deletion
mp/tasks
(remove it from the hierarchy)
# mount -o remount,cpuset xxx /mnt
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 76 ---
1 files changed, 61 insertions(+), 15 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 46df5f8.
On x86_32, sizeof(struct cgroup_subsys) shrinks from 276 bytes
to 264.
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ed4ba11..e23ded6 100644
--- a/include
Stephane posted a patchset to add perf_cgroup subsystem, so perf can
be used to monitor all threads belonging to a cgroup.
But if you already mounted a cgroup hierarchy but without perf_cgroup
and the hierarchy has sub-cgroups, you can't bind perf_cgroup to it,
and thus you're not able to use per-
Stephen Hemminger wrote:
> On Wed, 20 Oct 2010 09:43:06 +0800
> Li Zefan wrote:
>
>> Stephen Hemminger wrote:
>>> On Tue, 19 Oct 2010 18:14:10 -0700
>>> Paul Menage wrote:
>>>
>>>> On Tue, Oct 19, 2010 at 6:12 PM, Stephen Hemmi
Stephen Hemminger wrote:
> On Tue, 19 Oct 2010 18:14:10 -0700
> Paul Menage wrote:
>
>> On Tue, Oct 19, 2010 at 6:12 PM, Stephen Hemminger
>> wrote:
>>> Where is it stored in an array?
>>>
>>> ~/kernel/linux-2.6$ git grep debug_subsys
>>> kernel/cgroup.c:kfree(cont->subsys[debug_subsys_i
Stephen Hemminger wrote:
> While running namespace checks to look for dead code,
> I found that debug_subsys is declared global but never
> used in current code.
>
> This leads to the fact that since debug_subsys is never
> used, the whole set of debugging functions is also never
> used. Is the w
Daniel Lezcano wrote:
> The different cgroup subsystems are under the cgroup submenu.
> The dependency between the cgroups and the menu subsystems is
> pointless.
Indead.
>
> Signed-off-by: Daniel Lezcano
Acked-by: Li Zefan
> ---
> init/Kconfig | 14 --
rent_cg to avoid
> breaking bisect.
>
> Signed-off-by: Michael S. Tsirkin
Acked-by: Li Zefan
I also don't like the name, but I'm not good at English or naming. ;)
> ---
>
> Paul, Li, Sridhar, could you please review the following
> patch?
>
> I only compile-
Masanari Iida wrote:
> Fix command example in cpuacct.txt
>
> Signed-off-by: Masanari Iida
Obviously correct..
Acked-by: Li Zefan
> ---
> Documentation/cgroups/cpuacct.txt |2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/
Andrew Morton wrote:
> On Fri, 30 Jul 2010 19:56:49 -0400
> Ben Blum wrote:
>
>> This patch series implements a write function for the 'cgroup.procs'
>> per-cgroup file, which enables atomic movement of multithreaded
>> applications between cgroups. Writing the thread-ID of any thread in a
>> thr
;
> At present, the cpuset is the only one which had implemented the post_clone
> callback.
>
> The option can be set at mount time by specifying the 'clone_children' mount
> option.
>
> Signed-off-by: Daniel Lezcano
> Signed-off-
S references.
>
> Signed-off-by: Daniel Lezcano
> Signed-off-by: Serge E. Hallyn
> Cc: Eric W. Biederman
> Cc: Paul Menage
> Cc: Jamal Hadi Salim
Reviewed-by: Li Zefan
___
Containers mailing list
contain...@lists.linux-foundation.
the loop.
>
> Signed-off-by: Daniel Lezcano
> Signed-off-by: Serge E. Hallyn
> Cc: Eric W. Biederman
> Cc: Paul Menage
Reviewed-by: Li Zefan
___
Containers mailing list
contain...@lists.linux-foundation.org
https://lists.linux-foundation.o
On Fri, May 28, 2010 at 8:16 AM, Greg Thelen wrote:
> Signed-off-by: Greg Thelen
Acked-by: Paul Menage
Good catch, thanks.
>>> Nice Catch.
>>> Acked-by: KAMEZAWA Hiroyuki
>>>
>>> But, who breaks this ? Do we need backport this against old kernels ?
>>>
>> http://git
Catch.
> Acked-by: KAMEZAWA Hiroyuki
>
> But, who breaks this ? Do we need backport this against old kernels ?
>
Oops, I broke it, and it needs to be backported to 2.6.34..
Thanks for catching this!
Acked-by: Li Zefan
___
Containers mailing
Paul E. McKenney wrote:
> On Thu, Apr 22, 2010 at 05:32:28PM +0800, Li Zefan wrote:
>> with CONFIG_PROVE_RCU=y, a warning can be triggered:
>>
>> # mount -t cgroup -o blkio xxx /mnt
>> # mkdir /mnt/subgroup
>>
>> ...
>> kernel/cgroup.c:4442 invok
task_subsys_state() is safe under task_lock(). See
Documentation/cgroups/cgroups.txt for locking rule.
This fixes an RCU warning when resume from suspend. The
warning comes from freezer cgroup in cgroup_freezing_or_frozen().
Signed-off-by: Li Zefan
---
I'm not sure which is preferable - a
;>>>
>>>> task_freezer() calls task_subsys_state(), which needs to be
>>>> protected by rcu_read_lock or cgroup_mutex.
>>>>
>>>> Signed-off-by: Li Zefan
>>>> ---
>>>> kernel/cgroup_freezer.c |2 ++
>>>
.
Signed-off-by: Li Zefan
---
block/blk-cgroup.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 5fe03de..2cc682b 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -286,16 +286,16 @@ done:
static struct
with CONFIG_PROVE_RCU, a warning can be triggered when we
resume from suspend:
...
include/linux/cgroup.h:533 invoked rcu_dereference_check() without protection!
...
task_freezer() calls task_subsys_state(), which needs to be
protected by rcu_read_lock or cgroup_mutex.
Signed-off-by: Li Zefan
With CONFIG_PROVE_RCU=y, a warning can be triggered:
$ cat /proc/sched_debug
...
kernel/cgroup.c:1649 invoked rcu_dereference_check() without protection!
...
Both cgroup_path() and task_group() should be called with either
rcu_read_lock or cgroup_mutex held.
Signed-off-by: Li Zefan
With CONFIG_PROVE_RCU=y, a warning can be triggered:
# mount -t cgroup -o memory xxx /mnt
# mkdir /mnt/0
...
kernel/cgroup.c:4442 invoked rcu_dereference_check() without protection!
...
This is a false-positive. It's safe to directly access parent_css->id.
Signed-off-by:
cgroup_mutex held.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 12 +---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e2769e1..4ca928d 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1646,7 +1646,9 @@ static inline struct
Jens Axboe wrote:
> On Mon, Mar 15 2010, Li Zefan wrote:
>> Make the config visible, so we can choose from CONFIG_BLK_CGROUP=y
>> and CONFIG_BLK_CGROUP=m when CONFIG_IOSCHED_CFQ=m.
>>
>> Signed-off-by: Li Zefan
>
> What kernel is this against?
>
It's a
>> ---help---
>> Generic block IO controller cgroup interface. This is the common
>> @@ -91,7 +92,7 @@ config BLK_CGROUP
>> to such task groups.
>>
>> config DEBUG_BLK_CGROUP
>> -bool
>> +bool "Block cgroup debugging help"
>
>
> Why are you making DEBUG_BLK_CGROUP this a
commit e6a1105b ("cgroups: subsystem module loading interface")
and commit c50cc752 ("sched, cgroups: Fix module export")
result in duplicate including of module.h
Signed-off-by: Li Zefan
---
Fix changelog...
---
kernel/cgroup.c |1 -
1 files changed, 0 insertions(+),
commit e6a1105b ("cgroups: subsystem module loading interface")
and commit c50cc752 ("sched, cgroups: Fix module export")
result in duplicate including of cgroup.h
Signed-off-by: Li Zefan
---
kernel/cgroup.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
Make the config visible, so we can choose from CONFIG_BLK_CGROUP=y
and CONFIG_BLK_CGROUP=m when CONFIG_IOSCHED_CFQ=m.
Signed-off-by: Li Zefan
---
block/Kconfig |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/block/Kconfig b/block/Kconfig
index 62a5921..906950c
Kirill A. Shutemov wrote:
> glibc's dprintf(3) is buggy:
> http://sourceware.org/bugzilla/show_bug.cgi?id=11319
>
> Let's not to use it in the example.
>
> Signed-off-by: Kirill A. Shutemov
Reviewed-by: Li Zefan
___
Con
Kirill A. Shutemov wrote:
> On Wed, Feb 24, 2010 at 5:22 AM, Li Zefan wrote:
>> How to reproduce:
>>
>> # mount -t cgroup -o memory xxx /cgroup
>> # mkdir /cgroup/tmp
>> # ./cgroup_event_listener /cgroup/tmp/cgroup.event_control abc
>> ^C
>> # rmd
> + ret = dprintf(event_control, "%d %d %s", efd, cfd, argv[2]);
I found it won't return negative value for invalid input, though
errno is set properly.
try:
# ./cgroup_event_listner /cgroup/cgroup.procs abc
while strace shows write() does return -1:
# strace ./cgroup_event_listner /cgroup/
(failed!)
Using a single goto label to cleanup multi failure paths can
get things wrong quite easily, while multi labels makes the
code cleaner.
Signed-off-by: Li Zefan
---
cgroup.c | 39 ++-
1 file changed, 18 insertions(+), 21 deletions(-)
diff --gi
Kirill A. Shutemov wrote:
> An example of cgroup notification API usage.
>
> Signed-off-by: Kirill A. Shutemov
> Reviewed-by: KAMEZAWA Hiroyuki
Acked-by: Li Zefan
___
Containers mailing list
contain...@lists.linux-foundation.org
https:/
Kirill A. Shutemov wrote:
> Events should be removed after rmdir of cgroup directory, but before
> destroying subsystem state objects. Let's take reference to cgroup
> directory dentry to do that.
>
> Signed-off-by: Kirill A. Shutemov
> Acked-by: KAMEZAWA Hiroyuki
Lo
k if the cgroup
> still exists. To avoid race beetween userspace and kernelspace we have
> to notify userspace about cgroup removing only after rmdir of cgroup
> directory.
>
> Signed-off-by: Kirill A. Shutemov
> Reviewed-by: KAMEZ
Don't Call get_pid_ns() before we locate/alloc the ns.
Signed-off-by: Li Zefan
---
cgroup.c |8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/kernel/cgroup.c.orig 2010-01-26 14:24:29.0 +0800
+++ a/kernel/cgroup.c 2010-01-26 14:24:44.0
)
# mount -t cgroup -o blkio xxx /mnt
# for ((i = 0; i < 65534; i++)); do mkdir /mnt/$i; done
# mkdir /mnt/65534
(should return ENOSPC)
#
Signed-off-by: Li Zefan
---
cgroup.c |7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/kernel/cgroup.c.orig 2010-01-19 16
Jens Axboe wrote:
> On Tue, Jan 12 2010, Ben Blum wrote:
>> Convert blk-cgroup to be buildable as a module
>>
>> From: Ben Blum
>>
>> This patch modifies the Block I/O cgroup subsystem to be able to be built as
>> a
>> module. As the CFQ disk scheduler optionally depends on blk-cgroup, config
>>
Kirill A. Shutemov wrote:
> On Thu, Jan 7, 2010 at 3:01 AM, Paul Menage wrote:
>> On Wed, Dec 30, 2009 at 7:57 AM, Kirill A. Shutemov
>> wrote:
>>> +
>>> + if (!IS_ERR(efile))
>>> + fput(efile);
>> While this is OK currently, it's a bit fragile. efile starts as NULL,
>> and IS
KAMEZAWA Hiroyuki wrote:
> On Wed, 6 Jan 2010 20:26:06 -0500
> Ben Blum wrote:
>
>> On Wed, Jan 06, 2010 at 04:04:14PM -0800, Andrew Morton wrote:
>>> On Thu, 31 Dec 2009 00:10:50 -0500
>>> Ben Blum wrote:
>>>
This patch series implements support for building, loading, and
unloading su
>>> + write_lock(&css_set_lock);
>>> + for (i = 0; i < CSS_SET_TABLE_SIZE; i++) {
>>> + struct css_set *cg;
>>> + struct hlist_node *node, *tmp;
>>> + struct hlist_head *bucket = &css_set_table[i], *new_bucket;
>> Please add a blank line between variable declaratio
nce (at load time) to once per attached
> hierarchy (in parse_cgroupfs_options and rebind_subsystems) (i.e., 0 or 1).
>
> It also adds a proper module_delete call in net/sched/cls_cgroup.c.
>
> Signed-off-by: Ben Blum
Acked-by: Li Zefan
Also please fix commen
o allow the subsys_id to be either declared as a
> compile-time constant by the cgroup_subsys.h include in cgroup.h, or, if it's
> a module, initialized within the struct by cgroup_load_subsys.
>
> Signed-off-by: Ben Blum
Acked-by: Li Zefan
But can w
uct module pointer in struct cgroup_subsys.
>
> Several functions that might be wanted by modules have had EXPORT_SYMBOL added
> to them, but it's unclear exactly which functions want it and which won't.
>
> Signed-off-by: Ben Blum
Acked-by: Li Zefan
Some small nit
andle when subsystems are not present or may appear/disappear.
>
> Signed-off-by: Ben Blum
Acked-by: Li Zefan
...
A small nitpick:
> +/* This define indicates the maximum number of subsystems that can be loaded
> + * at once. We limit to this many since cgroupfs_root has subsys_b
the use_count increment when a matching
> pidlist is found by cgroup_pidlist_find(), because it gets bumped by
> the calling pidlist_array_load() function while still protected by the
> list's mutex.
>
> Signed-off-by: Dave Anderson
>
Reviewed-by: Li Zefan
__
>> It seems what you asked was an example of cgroup.
>> Maybe the simplest cgroup in the kernel is CONFIG_CGROUP_CPUACCT.
>> (kernel/sched.c) The next one is CGROUP_DEVICE (security/device_cgroup.c)
>>
>> Documentation under Documentation/cgroups/ is always taken care to be
>> updated.
>> If you
>> +/*
>> + * Check if a file is a control file
>> + */
>> +static inline struct cftype *__file_cft(struct file *file)
>> +{
>> +if (file->f_dentry->d_inode->i_fop != &cgroup_file_operations)
>> +return ERR_PTR(-EINVAL);
>
> I don't think this check is needed.
>
Sorry, please ign
1 - 100 of 403 matches
Mail list logo