.
- fixed the call to idr_alloc() in cgroup_init() in the first patch.
Li Zefan (5):
memcg: convert to use cgroup_is_descendant()
memcg: convert to use cgroup id
memcg: fail to create cgroup if the cgroup id is too big
memcg: stop using css id
cgroup: kill css_id
The only user of css_id was memcg, and it has been convered to use
cgroup-id, so kill css_id.
Signed-off-by: Li Zefan lize...@huwei.com
Reviewed-by: Michal Hocko mho...@suse.cz
Acked-by: Tejun Heo t...@kernel.org
---
include/linux/cgroup.h | 37
kernel/cgroup.c| 252
memcg requires the cgroup id to be smaller than 65536.
This is a preparation to kill css id.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index
Now memcg uses cgroup id instead of css id. Update some comments and
set mem_cgroup_subsys-use_id to 0.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 24
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git
If somebody needs a notification interface (and there is no one available
right now) then you cannot prevent from such a pointless work anyway...
I'm gonna add one for freezer state transitions. It'll be simple
this file changed thing and will probably apply that to at least oom
and
Hi Greg,
Could you queue this commit for 3.0 and 3.4? It has been acked by Ingo.
On 2013/8/2 19:14, Ingo Molnar wrote:
* Li Zefan lize...@huawei.com wrote:
commit a59f4e079d19464eebb9b06513a1d4f55fdae5ba
Author: Zhu Yanhai gaoyang@taobao.com
Date: Tue Jan 8 12:56:52 2013 +0800
>> The right answer to the code is to config it out and then you don't have
>> to worry about it one way or another.
>>
>
> Pardon?
>
> Excuse me, my English is not quite well, I don't quite understand your
> meaning, could you please repeat again in details or say more clearly ?
>
>
>> The
The right answer to the code is to config it out and then you don't have
to worry about it one way or another.
Pardon?
Excuse me, my English is not quite well, I don't quite understand your
meaning, could you please repeat again in details or say more clearly ?
The sysctl binary
On 2013/8/6 10:02, Li Zefan wrote:
>> static struct cftype mem_cgroup_files[] = {
>> {
>> .name = "usage_in_bytes",
>> @@ -5973,6 +6192,12 @@ static struct cftype mem_cgroup_files[] = {
>>
> static struct cftype mem_cgroup_files[] = {
> {
> .name = "usage_in_bytes",
> @@ -5973,6 +6192,12 @@ static struct cftype mem_cgroup_files[] = {
> .read_u64 = mem_cgroup_hierarchy_read,
> },
> {
> + .name = "cgroup.event_control",
> +
to kernels >= 3.0 && <= 3.7.
--
Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
= 3.7.
--
Li Zefan
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
static struct cftype mem_cgroup_files[] = {
{
.name = usage_in_bytes,
@@ -5973,6 +6192,12 @@ static struct cftype mem_cgroup_files[] = {
.read_u64 = mem_cgroup_hierarchy_read,
},
{
+ .name = cgroup.event_control,
+
On 2013/8/6 10:02, Li Zefan wrote:
static struct cftype mem_cgroup_files[] = {
{
.name = usage_in_bytes,
@@ -5973,6 +6192,12 @@ static struct cftype mem_cgroup_files[] = {
.read_u64 = mem_cgroup_hierarchy_read,
},
{
+.name
the rest. While the extra ref
> operations aren't strictly necessary, this shouldn't cause any
> noticeable difference.
>
> Signed-off-by: Tejun Heo
> Cc: Li Zefan
> Cc: Jens Axboe
> Cc: Vivek Goyal
> Cc: Matt Helsley
> Cc: Johannes Weiner
> Cc: Michal Hocko
On 2013/8/5 0:07, Tejun Heo wrote:
> cgroup_event is only available in memcg now. Let's brand it that way.
> While at it, add a comment encouraging deprecation of the feature and
> remove the respective section from cgroup documentation.
>
> This patch is cosmetic.
>
> Signed-off-by: Tejun Heo
于 2013/8/5 0:07, Tejun Heo 写道:
> cgroup_event is way over-designed and tries to build a generic
> flexible event mechanism into cgroup - fully customizable event
> specification for each user of the interface. This is utterly
> unnecessary and overboard especially in the light of the planned
>
> +struct cgroup *__cgroup_from_dentry(struct dentry *dentry, struct cftype
> **cftp)
> {
> - if (file_inode(file)->i_fop != _file_operations)
> - return ERR_PTR(-EINVAL);
> - return __d_cft(file->f_dentry);
> + if (!dentry->d_inode ||
> + dentry->d_inode->i_op !=
+struct cgroup *__cgroup_from_dentry(struct dentry *dentry, struct cftype
**cftp)
{
- if (file_inode(file)-i_fop != cgroup_file_operations)
- return ERR_PTR(-EINVAL);
- return __d_cft(file-f_dentry);
+ if (!dentry-d_inode ||
+ dentry-d_inode-i_op !=
于 2013/8/5 0:07, Tejun Heo 写道:
cgroup_event is way over-designed and tries to build a generic
flexible event mechanism into cgroup - fully customizable event
specification for each user of the interface. This is utterly
unnecessary and overboard especially in the light of the planned
unified
On 2013/8/5 0:07, Tejun Heo wrote:
cgroup_event is only available in memcg now. Let's brand it that way.
While at it, add a comment encouraging deprecation of the feature and
remove the respective section from cgroup documentation.
This patch is cosmetic.
Signed-off-by: Tejun Heo
, this shouldn't cause any
noticeable difference.
Signed-off-by: Tejun Heo t...@kernel.org
Cc: Li Zefan lize...@huawei.com
Cc: Jens Axboe ax...@kernel.dk
Cc: Vivek Goyal vgo...@redhat.com
Cc: Matt Helsley matth...@us.ibm.com
Cc: Johannes Weiner han...@cmpxchg.org
Cc: Michal Hocko mho...@suse.cz
Cc
commit a59f4e079d19464eebb9b06513a1d4f55fdae5ba
Author: Zhu Yanhai
Date: Tue Jan 8 12:56:52 2013 +0800
sched: Fix the broken sched_rr_get_interval()
Without this patch, syscall sched_rr_get_interval() can return wrong
value, and the bug was introduced in 2.6.24, so this looks like a
Cc: Ben Greear
Cc: Tejun
Hi Willy,
This patch introduced a bug, which was then fixed by commit 34376a50fb1f
("Fix lockup related to stop_machine being stuck in __do_softirq."),
do we need this fix for 2.6.32 ?
On 2013/6/5 1:23, Willy Tarreau wrote:
> 2.6.32-longterm review patch. If anyone has
Cc: Ben Greear
Cc: Tejun
Hi Willy,
This patch introduced a bug, which was then fixed by commit 34376a50fb1f
(Fix lockup related to stop_machine being stuck in __do_softirq.),
do we need this fix for 2.6.32 ?
On 2013/6/5 1:23, Willy Tarreau wrote:
2.6.32-longterm review patch. If anyone has
commit a59f4e079d19464eebb9b06513a1d4f55fdae5ba
Author: Zhu Yanhai gaoyang@taobao.com
Date: Tue Jan 8 12:56:52 2013 +0800
sched: Fix the broken sched_rr_get_interval()
Without this patch, syscall sched_rr_get_interval() can return wrong
value, and the bug was introduced in 2.6.24, so
> @@ -506,15 +506,17 @@ struct cftype {
>* you want to provide this functionality. Use eventfd_signal()
>* on eventfd to send notification to userspace.
>*/
> - int (*register_event)(struct cgroup *cgrp, struct cftype *cft,
> - struct eventfd_ctx
> @@ -4199,12 +4208,13 @@ static void init_cgroup_css(struct
> cgroup_subsys_state *css,
> /* invoke ->css_online() on a new CSS and mark it online if successful */
> static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp)
> {
> + struct cgroup_subsys_state *css =
> @@ -4298,7 +4308,7 @@ static long cgroup_create(struct cgroup *parent, struct
> dentry *dentry,
> for_each_root_subsys(root, ss) {
> struct cgroup_subsys_state *css;
>
> - css = ss->css_alloc(cgrp);
> + css =
On 2013/8/2 5:49, Tejun Heo wrote:
> For some reason, cgroup_advance_iter() is standing lonely all away
> from its iter comrades. Relocate it.
>
There're some other functions that are in the same situation. Do you
think it's better to relocate them, or just leave it as it is?
--
To unsubscribe
oup-remove-struct-cgroup_scanner.patch
> 0020-cgroup-make-task-iterators-deal-with-cgroup_subsys_s.patch
> 0021-cgroup-make-cftype-un-register_event-deal-with-cgrou.patch
> 0022-cgroup-make-cgroup_taskset-deal-with-cgroup_subsys_s.patch
> 0023-cgroup-unexport-cgroup_css.pat
-unexport-cgroup_css.patch
Looks good to me!
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ
On 2013/8/2 5:49, Tejun Heo wrote:
For some reason, cgroup_advance_iter() is standing lonely all away
from its iter comrades. Relocate it.
There're some other functions that are in the same situation. Do you
think it's better to relocate them, or just leave it as it is?
--
To unsubscribe
@@ -4298,7 +4308,7 @@ static long cgroup_create(struct cgroup *parent, struct
dentry *dentry,
for_each_root_subsys(root, ss) {
struct cgroup_subsys_state *css;
- css = ss-css_alloc(cgrp);
+ css = ss-css_alloc(parent-subsys[ss-subsys_id]);
As
@@ -4199,12 +4208,13 @@ static void init_cgroup_css(struct
cgroup_subsys_state *css,
/* invoke -css_online() on a new CSS and mark it online if successful */
static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp)
{
+ struct cgroup_subsys_state *css =
@@ -506,15 +506,17 @@ struct cftype {
* you want to provide this functionality. Use eventfd_signal()
* on eventfd to send notification to userspace.
*/
- int (*register_event)(struct cgroup *cgrp, struct cftype *cft,
- struct eventfd_ctx *eventfd,
It uses a single label and checks the validity of each pointer. This
is err-prone, and actually we had a bug because one of the check was
insufficient.
Use multi lables as we do in other places.
v2:
- drop initializations of local variables.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 39
It's a rw_semaphore not a mutex.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ae905a5..6662811 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3436,7
On 2013/7/31 19:35, Tejun Heo wrote:
> On Wed, Jul 31, 2013 at 05:27:39PM +0800, Li Zefan wrote:
>>> static int cgroup_seqfile_release(struct inode *inode, struct file *file)
>>> {
>>> - struct seq_file *seq = file->private_data;
>>> - kfree(seq->
On 2013/7/31 19:36, Tejun Heo wrote:
> On Wed, Jul 31, 2013 at 05:36:25PM +0800, Li Zefan wrote:
>> We can use struct cfent instead.
>>
>> v2:
>> - remove cgroup_seqfile_release().
>>
>> Signed-off-by: Li Zefan
>
> Applied to libata/for-3.12.
>
On 2013/7/31 19:38, Tejun Heo wrote:
> Hello,
>
> On Wed, Jul 31, 2013 at 04:18:07PM +0800, Li Zefan wrote:
>> As we've renamed css_set->cg_links to css_set->cgrp_links (See commit
>> 69d0206c79 "cgroup: bring some sanity to naming around cg_cgroup_link"),
&g
We can use struct cfent instead.
v2:
- remove cgroup_seqfile_release().
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 45 +
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 0d378b1..c836dff
> static int cgroup_seqfile_release(struct inode *inode, struct file *file)
> {
> - struct seq_file *seq = file->private_data;
> - kfree(seq->private);
> return single_release(inode, file);
> }
Oh, I just realized now we can remove cgroup_seqfile_release().
Will send out an
The first one is a small bug fix, and the rest are pure cleanups.
Li Zefan (7):
cgroup: fix a leak when percpu_ref_init() fails
cgroup: remove sparse tags from offline_css()
cgroup: restructure the failure path in cgroup_write_event_control()
cgroup: rename cgroup_pidlist
e a cgroup subsystem, it's fine to change the interface.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ac77d87..89d63b0 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -53
We can use struct struct cfent instead.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 38 --
1 file changed, 12 insertions(+), 26 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 0d378b1..ac77d87 100644
--- a/kernel/cgroup.c
+++ b/kernel
Constantly use @cset for css_set varabbles and use @cgrp as cgroup
variables.
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 6 +++---
kernel/cgroup.c| 26 +-
kernel/cpuset.c| 16
3 files changed, 24 insertions(+), 24 deletions
It uses a single label and checks the validity of each pointer. This
is err-prone, and actually we once had a bug because one of the check
was insufficient.
Use multi lables as we do in other places.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 33 +++--
1 file
It's a semaphore not a mutex.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index f0d7f5d..0d378b1 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3417,7 +3417,7
This should have been removed in commit d7eeac1913ff
("cgroup: hold cgroup_mutex before calling css_offline").
While at it, update the comments.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/cgroup.
ss->css_free() is not called when perfcpu_ref_init() fails.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index a64b7b8..e60eba2 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -427
The debug file is opened with single_open(), but there's no
single_release().
Signed-off-by: Li Zefan
---
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
b/drivers
The debug file is opened with single_open(), but there's no
single_release().
Signed-off-by: Li Zefan
---
drivers/staging/rtl8192e/rtllib_module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtllib_module.c
b/drivers/staging/rtl8192e
The debug file is opened with single_open(), but there's no
single_release().
Signed-off-by: Li Zefan lize...@huawei.com
---
drivers/staging/rtl8192e/rtllib_module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtllib_module.c
b/drivers/staging
The debug file is opened with single_open(), but there's no
single_release().
Signed-off-by: Li Zefan lize...@huawei.com
---
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/ieee80211
This should have been removed in commit d7eeac1913ff
(cgroup: hold cgroup_mutex before calling css_offline).
While at it, update the comments.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/cgroup.c
ss-css_free() is not called when perfcpu_ref_init() fails.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index a64b7b8..e60eba2 100644
--- a/kernel/cgroup.c
+++ b/kernel
It's a semaphore not a mutex.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index f0d7f5d..0d378b1 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
It uses a single label and checks the validity of each pointer. This
is err-prone, and actually we once had a bug because one of the check
was insufficient.
Use multi lables as we do in other places.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 33
The first one is a small bug fix, and the rest are pure cleanups.
Li Zefan (7):
cgroup: fix a leak when percpu_ref_init() fails
cgroup: remove sparse tags from offline_css()
cgroup: restructure the failure path in cgroup_write_event_control()
cgroup: rename cgroup_pidlist
to change the interface.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ac77d87..89d63b0 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5312,9 +5312,9
We can use struct struct cfent instead.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 38 --
1 file changed, 12 insertions(+), 26 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 0d378b1..ac77d87 100644
--- a/kernel
Constantly use @cset for css_set varabbles and use @cgrp as cgroup
variables.
Signed-off-by: Li Zefan lize...@huawei.com
---
include/linux/cgroup.h | 6 +++---
kernel/cgroup.c| 26 +-
kernel/cpuset.c| 16
3 files changed, 24 insertions
static int cgroup_seqfile_release(struct inode *inode, struct file *file)
{
- struct seq_file *seq = file-private_data;
- kfree(seq-private);
return single_release(inode, file);
}
Oh, I just realized now we can remove cgroup_seqfile_release().
Will send out an updated
We can use struct cfent instead.
v2:
- remove cgroup_seqfile_release().
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 45 +
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index
On 2013/7/31 19:36, Tejun Heo wrote:
On Wed, Jul 31, 2013 at 05:36:25PM +0800, Li Zefan wrote:
We can use struct cfent instead.
v2:
- remove cgroup_seqfile_release().
Signed-off-by: Li Zefan lize...@huawei.com
Applied to libata/for-3.12.
libata? I hope you didn't
On 2013/7/31 19:38, Tejun Heo wrote:
Hello,
On Wed, Jul 31, 2013 at 04:18:07PM +0800, Li Zefan wrote:
As we've renamed css_set-cg_links to css_set-cgrp_links (See commit
69d0206c79 cgroup: bring some sanity to naming around cg_cgroup_link),
it's better to also rename the debug file
On 2013/7/31 19:35, Tejun Heo wrote:
On Wed, Jul 31, 2013 at 05:27:39PM +0800, Li Zefan wrote:
static int cgroup_seqfile_release(struct inode *inode, struct file *file)
{
- struct seq_file *seq = file-private_data;
- kfree(seq-private);
return single_release(inode, file);
}
Oh
It's a rw_semaphore not a mutex.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ae905a5..6662811 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
It uses a single label and checks the validity of each pointer. This
is err-prone, and actually we had a bug because one of the check was
insufficient.
Use multi lables as we do in other places.
v2:
- drop initializations of local variables.
Signed-off-by: Li Zefan lize...@huawei.com
Use cgroup id instead of css id. This is a preparation to kill css id.
Note, as memcg treat 0 as an invalid id, while cgroup id starts with 0,
we define memcg_id == cgroup_id + 1.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 34 --
1
The only user of css_id was memcg, and it has been convered to use
cgroup->id, so kill css_id.
Signed-off-by: Li Zefan
Reviewed-by: Michal Hocko
---
include/linux/cgroup.h | 37
kernel/cgroup.c| 252 +
2 files changed
This will be used as a replacement for css_lookup().
There's a difference with cgroup id and css id. cgroup id starts with 0,
while css id starts with 1.
v4:
- also check if cggroup_mutex is held.
- make it an inline function.
Signed-off-by: Li Zefan
Reviewed-by: Michal Hocko
---
include
memcg requires the cgroup id to be smaller than 65536.
This is a preparation to kill css id.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 62541f5..ad7d7c9 100644
--- a/mm
Now memcg uses cgroup id instead of css id. Update some comments and
set mem_cgroup_subsys->use_id to 0.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 23 ---
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/mm/memcontrol.c b
As cgroup id has been used in netprio cgroup and will be used in memcg,
it's important to make it clear how a cgroup id is allocated.
For example, in netprio cgroup, the id is used as index of anarray.
Signed-off-by: Li Zefan
Reviewed-by: Michal Hocko
---
include/linux/cgroup.h | 8
This is a preparation to kill css_id.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d12ca6f..626c426 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1434,7
-by: Li Zefan
Reviewed-by: Michal Hocko
---
include/linux/cgroup.h | 4 ++--
kernel/cgroup.c| 33 +++--
2 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 297462b..2bd052d 100644
--- a/include/linux
_mutex is held.
- add a comment for idr_remove() in cgroup_offline)fn().
v2->v3:
- some minor cleanups suggested by Michal.
- fixed the call to idr_alloc() in cgroup_init() in the first patch.
Li Zefan (8):
cgroup: convert cgroup_ida to cgroup_idr
cgroup: document how cgroup IDs are
On 2013/7/30 16:51, Xue jiufei wrote:
> On 2013/7/30 15:30, Xue jiufei wrote:
>> Hi,
>> We have encountered an error when umounting ocfs2 filesystems.
>> Function ocfs2_leave_group() calls call_usermodehelper() to stop
>> heartbeat thread, but it returns -513(ERESTARTNOINTR) in one test.
>> And
On 2013/7/30 16:51, Xue jiufei wrote:
On 2013/7/30 15:30, Xue jiufei wrote:
Hi,
We have encountered an error when umounting ocfs2 filesystems.
Function ocfs2_leave_group() calls call_usermodehelper() to stop
heartbeat thread, but it returns -513(ERESTARTNOINTR) in one test.
And after that
-by: Li Zefan lize...@huawei.com
Reviewed-by: Michal Hocko mho...@suse.cz
---
include/linux/cgroup.h | 4 ++--
kernel/cgroup.c| 33 +++--
2 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 297462b
is held.
- add a comment for idr_remove() in cgroup_offline)fn().
v2-v3:
- some minor cleanups suggested by Michal.
- fixed the call to idr_alloc() in cgroup_init() in the first patch.
Li Zefan (8):
cgroup: convert cgroup_ida to cgroup_idr
cgroup: document how cgroup IDs are assigned
This is a preparation to kill css_id.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d12ca6f..626c426 100644
--- a/mm/memcontrol.c
As cgroup id has been used in netprio cgroup and will be used in memcg,
it's important to make it clear how a cgroup id is allocated.
For example, in netprio cgroup, the id is used as index of anarray.
Signed-off-by: Li Zefan lize...@huwei.com
Reviewed-by: Michal Hocko mho...@suse.cz
memcg requires the cgroup id to be smaller than 65536.
This is a preparation to kill css id.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index
Now memcg uses cgroup id instead of css id. Update some comments and
set mem_cgroup_subsys-use_id to 0.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 23 ---
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git
This will be used as a replacement for css_lookup().
There's a difference with cgroup id and css id. cgroup id starts with 0,
while css id starts with 1.
v4:
- also check if cggroup_mutex is held.
- make it an inline function.
Signed-off-by: Li Zefan lize...@huawei.com
Reviewed-by: Michal Hocko
The only user of css_id was memcg, and it has been convered to use
cgroup-id, so kill css_id.
Signed-off-by: Li Zefan lize...@huwei.com
Reviewed-by: Michal Hocko mho...@suse.cz
---
include/linux/cgroup.h | 37
kernel/cgroup.c| 252
Use cgroup id instead of css id. This is a preparation to kill css id.
Note, as memcg treat 0 as an invalid id, while cgroup id starts with 0,
we define memcg_id == cgroup_id + 1.
Signed-off-by: Li Zefan lize...@huawei.com
Acked-by: Michal Hocko mho...@suse.cz
---
mm/memcontrol.c | 34
On 2013/7/30 11:10, Joe Perches wrote:
> On Tue, 2013-07-30 at 11:04 +0800, Li Zefan wrote:
>> On 2013/7/30 10:36, Joe Perches wrote:
>>> On Tue, 2013-07-30 at 10:06 +0800, Li Zefan wrote:
>>>> On 2013/7/30 9:58, Joe Perches wrote:
>>>>> So what are t
On 2013/7/30 10:36, Joe Perches wrote:
> On Tue, 2013-07-30 at 10:06 +0800, Li Zefan wrote:
>> On 2013/7/30 9:58, Joe Perches wrote:
>>> So what are these TRACE_ defines that need
>>> excluding from the "complex values" check?
>>>
On 2013/7/30 9:58, Joe Perches wrote:
> On Tue, 2013-07-30 at 09:30 +0800, Li Zefan wrote:
>> On 2013/7/30 3:52, Sarah Sharp wrote:
>>> Hi Andy and Joe,
>>>
>>> Checkpatch is complaining when code adds new trace events macros:
>>>
>>> sarah@xan
> I am also seeing what looks like a leak somewhere in the cgroup code as
> well. After some runs of the same reproducer I get into a state where
> after everything is clean up. All of the control groups have been
> removed and the cgroup filesystem is unmounted, I can mount a cgroup
>
On 2013/7/30 3:52, Sarah Sharp wrote:
> Hi Andy and Joe,
>
> Checkpatch is complaining when code adds new trace events macros:
>
> sarah@xanatos:~/git/kernels/xhci$ git am -s ~/Maildir.fetchmail/.to-apply
> Applying: xhci: add traces for debug messages in xhci_address_device()
> ERROR: Macros
On 2013/7/30 2:28, Tejun Heo wrote:
> Hello,
>
> On Mon, Jul 29, 2013 at 03:07:48PM +0800, Li Zefan wrote:
>> @@ -4590,6 +4599,9 @@ static void cgroup_offline_fn(struct work_struct *work)
>> /* delete this cgroup from parent->children */
>> list_del_rcu(&g
On 2013/7/30 2:26, Tejun Heo wrote:
> On Mon, Jul 29, 2013 at 03:08:04PM +0800, Li Zefan wrote:
>> As cgroup id has been used in netprio cgroup and will be used in memcg,
>> it's important to make it clear how a cgroup id is allocated.
>>
>> For example, in netprio cgro
The only user of css_id was memcg, and it has been convered to use
cgroup->id, so kill css_id.
Signed-off-by: Li Zefan
Reviewed-by: Michal Hocko
---
include/linux/cgroup.h | 37
kernel/cgroup.c| 252 +
2 files changed
As cgroup id has been used in netprio cgroup and will be used in memcg,
it's important to make it clear how a cgroup id is allocated.
For example, in netprio cgroup, the id is used as index of anarray.
Signed-off-by: Li Zefan
Reviewed-by: Michal Hocko
---
include/linux/cgroup.h | 8
memcg requires the cgroup id to be smaller than 65536.
This is a preparation to kill css id.
Signed-off-by: Li Zefan
Acked-by: Michal Hocko
---
mm/memcontrol.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 62541f5..ad7d7c9 100644
--- a/mm
601 - 700 of 1870 matches
Mail list logo