debug cgroup: remove unneeded cgroup_lock
PATCH 1/1 debug cgroup: remove unneeded cgroup_lock
Since we are in cgroup write handler, so the cgrp is valid, so we don't have to hold cgroup_mutex when calling cgroup_task_count(). One similar example is in cgroup_tasks_open().
--- kernel/cgroup_debug.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
kernel/cgroup_debug.c +0 -2
@@ -40,9 +40,7 @@ static u64 taskcount_read(struct cgroup *cont, struct cftype *cft) {u64 count; -cgroup_lock (); count =cgroup_task_count (cont); -cgroup_unlock ();return count; }
Signature · 1 line
1.5.4.rc3
A message that is not in the archive (sent off-list or not yet received): [email protected]
Paul Menage
Acked-byQuoted 5 lines · Li Zefan
Since we are in cgroup write handler, so the cgrp is valid, so we don't have to hold
cgroup_mutexwhen callingcgroup_task_count(). One similar example is incgroup_tasks_open().Signed-off-by Li Zefan <[email protected]>
(Although this conflicts with a patch that I'm about to send out that moves the code from cgroup_debug.c into cgroup.c to allow internal details to be reported in the debug.* files.)
Quoted 22 lines
--- kernel/cgroup_debug.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)kernel/cgroup_debug.c +0
-3@@ -40,9 +40,7 @@ static u64 taskcount_read(struct cgroup *cont, struct cftype *cft) {u64 count; -cgroup_lock (); count =cgroup_task_count (cont); -cgroup_unlock ();return count; } --1.5.4.rc3
Quoted 5 lines · Li Zefan
Since we are in cgroup write handler, so the cgrp is valid, so we don't have to hold
cgroup_mutexwhen callingcgroup_task_count(). One similar example is incgroup_tasks_open().Signed-off-by Li Zefan <[email protected]>
(Although this conflicts with a patch that I'm about to send out that moves the code from cgroup_debug.c into cgroup.c to allow internal details to be reported in the debug.* files.)
Quoted 22 lines
--- kernel/cgroup_debug.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)kernel/cgroup_debug.c +0
-3@@ -40,9 +40,7 @@ static u64 taskcount_read(struct cgroup *cont, struct cftype *cft) {u64 count; -cgroup_lock (); count =cgroup_task_count (cont); -cgroup_unlock ();return count; } --1.5.4.rc3
A message that is not in the archive (sent off-list or not yet received): 6599ad830903111943u2799333dh680470f9daa6ccbb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 5 lines · Paul Menage
Quoted 4 lines · Li Zefan
Since we are in cgroup write handler, so the cgrp is valid, so we don't have to hold
cgroup_mutexwhen callingcgroup_task_count(). One similar example is incgroup_tasks_open().
Quoted 8 lines
Quoted 1 line
Signed-off-by Li Zefan <[email protected]>Acked-by Paul Menage <[email protected]>(Although this conflicts with a patch that I'm about to send out that moves the code from
cgroup_debug.cintocgroup.cto allow internal details to be reported in the debug.* files.)
or let cgroup.c #include <cgroup_debug.c> ?
Quoted 5 lines · Paul Menage
Quoted 4 lines · Li Zefan
Since we are in cgroup write handler, so the cgrp is valid, so we don't have to hold
cgroup_mutexwhen callingcgroup_task_count(). One similar example is incgroup_tasks_open().
Quoted 8 lines
Quoted 1 line
Signed-off-by Li Zefan <[email protected]>Acked-by Paul Menage <[email protected]>(Although this conflicts with a patch that I'm about to send out that moves the code from
cgroup_debug.cintocgroup.cto allow internal details to be reported in the debug.* files.)
or let cgroup.c #include <cgroup_debug.c> ?