cgroup: Implement cgroup v2 thread mode & CPU controller
Subsystems (8)
Waiman Long
maintainercover cgroup: Implement cgroup v2 thread mode & CPU controller
This patchset incorporates the following 2 patchsets from Tejun Heo:
1) cgroup v2 thread mode patchset (5 patches)
https://lkml.org/lkml/2017/2/2/592 2) CPU Controller on Control Group v2 (2 patches) https://lkml.org/lkml/2016/8/5/368
Additional patches are then layered on top to implement the following new features:
1) An enhanced v2 thread mode where a thread root (root of a threaded subtree) can have non-threaded children with non-threaded controllers enabled and no internal process constraint does not apply.
2) An enhanced debug controller which dumps out more information relevant to the debugging and testing of cgroup v2 in general.
3) Separate control knobs for resource domain controllers can be enabled in a thread root to manage all the internal processes in the threaded subtree.
Patches 1-5 are Tejun's cgroup v2 thread mode patchset.
Patch 6 fixes a task_struct reference counting bug introduced in patch 1.
Patch 7 moves the debug cgroup out from cgroup_v1.c into its own file.
Patch 8 keeps more accurate counts of the number of tasks associated with each css_set.
Patch 9 enhances the debug controller to provide more information relevant to the cgroup v2 thread mode to ease debugging effort.
Patch 10 implements the enhanced cgroup v2 thread mode with the following enhancements:
1) Thread roots are treated differently from threaded cgroups.
2) Thread root can now have non-threaded controllers enabled as well as non-threaded children.
Patches 11-12 are Tejun's CPU controller on control group v2 patchset.
Patch 13 makes both cpu and cpuacct controllers threaded.
Patch 14 enables the creation of a special "cgroup.self" directory under the thread root to hold resource control knobs for controllers that don't want resource competiton between internal processes and non-threaded child cgroups.
Preliminary testing was done with the debug controller enabled. Things seemed to work fine so far. More rigorous testing will be needed, and any suggestions are welcome.
Tejun Heo (7):
cgroup: reorganize cgroup.procs / task write path
cgroup: add @flags to css_task_iter_start() and implement
CSS_TASK_ITER_PROCS
cgroup: introduce cgroup->proc_cgrp and threaded css_set handling
cgroup: implement CSS_TASK_ITER_THREADED
cgroup: implement cgroup v2 thread support
sched: Misc preps for cgroup unified hierarchy interface
sched: Implement interface for cgroup unified hierarchy
Waiman Long (7):
cgroup: Fix reference counting bug in cgroup_procs_write()
cgroup: Move debug cgroup to its own file
cgroup: Keep accurate count of tasks in each css_set
cgroup: Make debug cgroup support v2 and thread mode
cgroup: Implement new thread mode semantics
sched: Make cpu/cpuacct threaded controllers
cgroup: Enable separate control knobs for thread root internal
processes
Documentation/cgroup-v2.txt | 114 +++++- include/linux/cgroup-defs.h | 56 +++ include/linux/cgroup.h | 12 +- kernel/cgroup/Makefile | 1 + kernel/cgroup/cgroup-internal.h | 18 +- kernel/cgroup/cgroup-v1.c | 217 +++------- kernel/cgroup/cgroup.c | 862 ++++++++++++++++++++++++++++++++++------ kernel/cgroup/cpuset.c | 6 +- kernel/cgroup/debug.c | 284 +++++++++++++ kernel/cgroup/freezer.c | 6 +- kernel/cgroup/pids.c | 1 + kernel/events/core.c | 1 + kernel/sched/core.c | 150 ++++++- kernel/sched/cpuacct.c | 55 ++- kernel/sched/cpuacct.h | 5 + mm/memcontrol.c | 3 +- net/core/netclassid_cgroup.c | 2 +- 17 files changed, 1478 insertions(+), 315 deletions(-) create mode 100644 kernel/cgroup/debug.c
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 1/14 cgroup: reorganize cgroup.procs / task write path
From: Tejun Heo <[email protected]>
Currently, writes "cgroup.procs" and "cgroup.tasks" files are all handled by __cgroup_procs_write() on both v1 and v2. This patch reoragnizes the write path so that there are common helper functions that different write paths use.
While this somewhat increases LOC, the different paths are no longer intertwined and each path has more flexibility to implement different behaviors which will be necessary for the planned v2 thread support.
--- kernel/cgroup/cgroup-internal.h | 8 +- kernel/cgroup/cgroup-v1.c | 58 ++++++++++++-- kernel/cgroup/cgroup.c | 163 +++++++++++++++++++++------------------- 3 files changed, 142 insertions(+), 87 deletions(-)
kernel/cgroup/cgroup-internal.h +4 -4
@@ -179,10 +179,10 @@ int cgroup_migrate(struct task_struct *leader, bool threadgroup,int cgroup_attach_task (struct cgroup *dst_cgrp,struct task_struct *leader,bool threadgroup); -ssize_t __cgroup_procs_write (struct kernfs_open_file *of,char *buf, -size_t nbytes,loff_t off,bool threadgroup); -ssize_t cgroup_procs_write (struct kernfs_open_file *of,char *buf,size_t nbytes, -loff_t off); +struct task_struct *cgroup_procs_write_start (char *buf,bool threadgroup) + __acquires(&cgroup_threadgroup_rwsem); +void cgroup_procs_write_finish(void) + __releases(&cgroup_threadgroup_rwsem);void cgroup_lock_and_drain_offline (struct cgroup *cgrp);
kernel/cgroup/cgroup-v1.c +53 -5
77 lines not on this page · raw message
kernel/cgroup/cgroup.c +85 -78
208 lines not on this page · raw message
Signature · 7 lines
1.8.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Waiman Long
maintainerRFC PATCH 2/14 cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS
In reply to Waiman LongFrom: Tejun Heo <[email protected]>
css_task_iter currently always walks all tasks. With the scheduled cgroup v2 thread support, the iterator would need to handle multiple types of iteration. As a preparation, add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS. If the flag is not specified, it walks all tasks as before. When asserted, the iterator only walks the group leaders.
For now, the only user of the flag is cgroup v2 "cgroup.procs" file which no longer needs to skip non-leader tasks in cgroup_procs_next(). Note that cgroup v1 "cgroup.procs" can't use the group leader walk as v1 "cgroup.procs" doesn't mean "list all thread group leaders in the cgroup" but "list all thread group id's with any threads in the cgroup".
While at it, update cgroup_procs_show() to use task_pid_vnr() instead of task_tgid_vnr(). As the iteration guarantees that the function only sees group leaders, this doesn't change the output and will allow sharing the function for thread iteration.
--- include/linux/cgroup.h | 6 +++++- kernel/cgroup/cgroup-v1.c | 6 +++--- kernel/cgroup/cgroup.c | 24 ++++++++++++++---------- kernel/cgroup/cpuset.c | 6 +++--- kernel/cgroup/freezer.c | 6 +++--- mm/memcontrol.c | 2 +- net/core/netclassid_cgroup.c | 2 +- 7 files changed, 30 insertions(+), 22 deletions(-)
include/linux/cgroup.h +5 -1
@@ -36,9 +36,13 @@#define CGROUP_WEIGHT_DFL 100#define CGROUP_WEIGHT_MAX 10000 +/* walk only threadgroup leaders */ +#define CSS_TASK_ITER_PROCS (1U << 0) +/* a css_task_iter should be treated as an opaque object */ struct css_task_iter {struct cgroup_subsys *ss; +unsigned int flags;struct list_head *cset_pos;struct list_head *cset_head;
@@ -129,7 +133,7 @@ struct task_struct *cgroup_taskset_first(struct cgroup_taskset *tset,struct task_struct *cgroup_taskset_next (struct cgroup_taskset *tset,struct cgroup_subsys_state **dst_cssp); -void css_task_iter_start (struct cgroup_subsys_state *css, +void css_task_iter_start (struct cgroup_subsys_state *css,unsigned int flags,struct css_task_iter *it);struct task_struct *css_task_iter_next (struct css_task_iter *it);void css_task_iter_end (struct css_task_iter *it);
kernel/cgroup/cgroup-v1.c +3 -3
@@ -121,7 +121,7 @@ int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from)* ->can_attach() fails. */ do { - css_task_iter_start(&from->self, &it); + css_task_iter_start(&from->self, 0, &it); task = css_task_iter_next(&it); if (task) get_task_struct(task);
@@ -377,7 +377,7 @@ static int pidlist_array_load(struct cgroup *cgrp, enum cgroup_filetype type,if (!array)return -ENOMEM ;/* now, populate the array */ -css_task_iter_start (&cgrp->self, &it); +css_task_iter_start (&cgrp->self,0 , &it);while ((tsk =css_task_iter_next (&it))) {if (unlikely (n == length))break ;
@@ -753,7 +753,7 @@ int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry) }rcu_read_unlock (); -css_task_iter_start (&cgrp->self, &it); +css_task_iter_start (&cgrp->self,0 , &it);while ((tsk =css_task_iter_next (&it))) {switch (tsk->state) {case TASK_RUNNING :
kernel/cgroup/cgroup.c +14 -10
@@ -3590,6 +3590,7 @@ static void css_task_iter_advance(struct css_task_iter *it)lockdep_assert_held (&css_set_lock);WARN_ON_ONCE (!l); +repeat:/* * Advance iterator to find next entry. cset->tasks is consumed * first and then ->mg_tasks. After ->mg_tasks, we move onto the
@@ -3604,11 +3605,18 @@ static void css_task_iter_advance(struct css_task_iter *it)css_task_iter_advance_css_set (it); else it->task_pos = l; + +/* if PROCS, skip over tasks which aren't group leaders */ +if ((it->flags &CSS_TASK_ITER_PROCS ) && it->task_pos && + !thread_group_leader(list_entry(it->task_pos, struct task_struct, + cg_list))) + goto repeat; }/** * css_task_iter_start - initiate task iteration * @css: the css to walk tasks of +* @flags: CSS_TASK_ITER_* flags * @it: the task iterator to use * * Initiate iteration through the tasks of @css. The caller can call
@@ -3616,7 +3624,7 @@ static void css_task_iter_advance(struct css_task_iter *it)* returns NULL. On completion of iteration, css_task_iter_end() must be * called. */ -void css_task_iter_start (struct cgroup_subsys_state *css, +void css_task_iter_start (struct cgroup_subsys_state *css,unsigned int flags,struct css_task_iter *it) {/* no one should try to iterate before mounting cgroups */
@@ -3627,6 +3635,7 @@ void css_task_iter_start(struct cgroup_subsys_state *css,spin_lock_irq (&css_set_lock); it->ss = css->ss; + it->flags = flags;if (it->ss) it->cset_pos = &css->cgroup->e_csets[css->ss->id];
@@ -3700,13 +3709,8 @@ static void *cgroup_procs_next(struct seq_file *s, void *v, loff_t *pos) {struct kernfs_open_file *of = s->private;struct css_task_iter *it = of->priv; -struct task_struct *task; - -do { - task =css_task_iter_next (it); - }while (task && !thread_group_leader (task)); -return task; +return css_task_iter_next (it); }static void *cgroup_procs_start (struct seq_file *s,loff_t *pos)
@@ -3727,10 +3731,10 @@ static void *cgroup_procs_start(struct seq_file *s, loff_t *pos)if (!it)return ERR_PTR (-ENOMEM ); of->priv = it; -css_task_iter_start (&cgrp->self, it); +css_task_iter_start (&cgrp->self,CSS_TASK_ITER_PROCS , it); }else if (!(*pos)++) {css_task_iter_end (it); -css_task_iter_start (&cgrp->self, it); +css_task_iter_start (&cgrp->self,CSS_TASK_ITER_PROCS , it); }return cgroup_procs_next (s,NULL ,NULL );
@@ -3738,7 +3742,7 @@ static void *cgroup_procs_start(struct seq_file *s, loff_t *pos)static int cgroup_procs_show (struct seq_file *s,void *v) { -seq_printf (s,"%d\n" ,task_tgid_vnr (v)); +seq_printf (s,"%d\n" ,task_pid_vnr (v));return 0 ; }
kernel/cgroup/cpuset.c +3 -3
@@ -861,7 +861,7 @@ static void update_tasks_cpumask(struct cpuset *cs)struct css_task_iter it;struct task_struct *task; -css_task_iter_start (&cs->css, &it); +css_task_iter_start (&cs->css,0 , &it);while ((task =css_task_iter_next (&it)))set_cpus_allowed_ptr (task, cs->effective_cpus);css_task_iter_end (&it);
@@ -1106,7 +1106,7 @@ static void update_tasks_nodemask(struct cpuset *cs)* It's ok if we rebind the same mm twice; mpol_rebind_mm() * is idempotent. Also migrate pages in each mm to new nodes. */ -css_task_iter_start (&cs->css, &it); +css_task_iter_start (&cs->css,0 , &it);while ((task =css_task_iter_next (&it))) {struct mm_struct *mm;bool migrate;
@@ -1299,7 +1299,7 @@ static void update_tasks_flags(struct cpuset *cs)struct css_task_iter it;struct task_struct *task; -css_task_iter_start (&cs->css, &it); +css_task_iter_start (&cs->css,0 , &it);while ((task =css_task_iter_next (&it)))cpuset_update_task_spread_flag (cs, task);css_task_iter_end (&it);
kernel/cgroup/freezer.c +3 -3
@@ -268,7 +268,7 @@ static void update_if_frozen(struct cgroup_subsys_state *css)rcu_read_unlock ();/* are all tasks frozen? */ -css_task_iter_start (css, &it); +css_task_iter_start (css,0 , &it);while ((task =css_task_iter_next (&it))) {if (freezing (task)) {
@@ -320,7 +320,7 @@ static void freeze_cgroup(struct freezer *freezer)struct css_task_iter it;struct task_struct *task; -css_task_iter_start (&freezer->css, &it); +css_task_iter_start (&freezer->css,0 , &it);while ((task =css_task_iter_next (&it)))freeze_task (task);css_task_iter_end (&it);
@@ -331,7 +331,7 @@ static void unfreeze_cgroup(struct freezer *freezer)struct css_task_iter it;struct task_struct *task; -css_task_iter_start (&freezer->css, &it); +css_task_iter_start (&freezer->css,0 , &it);while ((task =css_task_iter_next (&it)))__thaw_task (task);css_task_iter_end (&it);
mm/memcontrol.c +1 -1
@@ -951,7 +951,7 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,struct css_task_iter it;struct task_struct *task; -css_task_iter_start (&iter->css, &it); +css_task_iter_start (&iter->css,0 , &it);while (!ret && (task =css_task_iter_next (&it))) ret =fn (task, arg);css_task_iter_end (&it);
net/core/netclassid_cgroup.c +1 -1
@@ -100,7 +100,7 @@ static int write_classid(struct cgroup_subsys_state *css, struct cftype *cft, cs->classid = (u32 )value; -css_task_iter_start (css, &it); +css_task_iter_start (css,0 , &it);while ((p =css_task_iter_next (&it))) {task_lock (p); iterate_fd(p->files, 0, update_classid_sock,
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 3/14 cgroup: introduce cgroup->proc_cgrp and threaded css_set handling
In reply to Waiman LongFrom: Tejun Heo <[email protected]>
cgroup v2 is in the process of growing thread granularity support. Once thread mode is enabled, the root cgroup of the subtree serves as the proc_cgrp to which the processes of the subtree conceptually belong and domain-level resource consumptions not tied to any specific task are charged. In the subtree, threads won't be subject to process granularity or no-internal-task constraint and can be distributed arbitrarily across the subtree.
This patch introduces cgroup->proc_cgrp along with threaded css_set handling.
* cgroup->proc_cgrp is NULL if !threaded. If threaded, points to the proc_cgrp (root of the threaded subtree).
* css_set->proc_cset points to self if !threaded. If threaded, points to the css_set which belongs to the cgrp->proc_cgrp. The proc_cgrp serves as the resource domain and needs the matching csses readily available. The proc_cset holds those csses and makes them easily accessible.
* All threaded csets are linked on their proc_csets to enable iteration of all threaded tasks.
This patch adds the above but doesn't actually use them yet. The following patches will build on top.
--- include/linux/cgroup-defs.h | 22 ++++++++++++ kernel/cgroup/cgroup.c | 87 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 103 insertions(+), 6 deletions(-)
include/linux/cgroup-defs.h +22 -0
@@ -158,6 +158,15 @@ struct css_set {/* reference count */ atomic_t refcount; +/* +* If not threaded, the following points to self. If threaded, to +* a cset which belongs to the top cgroup of the threaded subtree. +* The proc_cset provides access to the process cgroup and its +* csses to which domain level resource consumptions should be +* charged. +*/ +struct css_set __rcu *proc_cset; +/* the default cgroup associated with this css_set */ struct cgroup *dfl_cgrp;
@@ -183,6 +192,10 @@ struct css_set {*/ struct list_head e_cset_node[CGROUP_SUBSYS_COUNT ]; +/* all csets whose ->proc_cset points to this cset */ +struct list_head threaded_csets; +struct list_head threaded_csets_node; +/* * List running through all cgroup groups in the same hash * slot. Protected by css_set_lock
@@ -289,6 +302,15 @@ struct cgroup {struct list_head e_csets[CGROUP_SUBSYS_COUNT ];/* +* If !threaded, NULL. If threaded, it points to the top cgroup of +* the threaded subtree, on which it points to self. Threaded +* subtree is exempt from process granularity and no-internal-task +* constraint. Domain level resource consumptions which aren't +* tied to a specific task should be charged to the proc_cgrp. +*/ +struct cgroup *proc_cgrp; + +/* * list of pidlists, up to two for each namespace (one for procs, one * for tasks); created on demand. */
kernel/cgroup/cgroup.c +81 -6
185 lines not on this page · raw message
Signature · 7 lines
1.8.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Waiman Long
maintainerRFC PATCH 4/14 cgroup: implement CSS_TASK_ITER_THREADED
In reply to Waiman LongFrom: Tejun Heo <[email protected]>
cgroup v2 is in the process of growing thread granularity support. Once thread mode is enabled, the root cgroup of the subtree serves as the proc_cgrp to which the processes of the subtree conceptually belong and domain-level resource consumptions not tied to any specific task are charged. In the subtree, threads won't be subject to process granularity or no-internal-task constraint and can be distributed arbitrarily across the subtree.
This patch implements a new task iterator flag CSS_TASK_ITER_THREADED, which, when used on a proc_cgrp, makes the iteration include the tasks on all the associated threaded css_sets. "cgroup.procs" read path is updated to use it so that reading the file on a proc_cgrp lists all processes. This will also be used by controller implementations which need to walk processes or tasks at the resource domain level.
Task iteration is implemented nested in css_set iteration. If CSS_TASK_ITER_THREADED is specified, after walking tasks of each !threaded css_set, all the associated threaded css_sets are visited before moving onto the next !threaded css_set.
--- include/linux/cgroup.h | 6 ++++ kernel/cgroup/cgroup.c | 81 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 14 deletions(-)
include/linux/cgroup.h +6 -0
@@ -38,6 +38,8 @@/* walk only threadgroup leaders */ #define CSS_TASK_ITER_PROCS (1U << 0) +/* walk threaded css_sets as part of their proc_csets */ +#define CSS_TASK_ITER_THREADED (1U << 1)/* a css_task_iter should be treated as an opaque object */ struct css_task_iter {
@@ -47,11 +49,15 @@ struct css_task_iter {struct list_head *cset_pos;struct list_head *cset_head; +struct list_head *tcset_pos; +struct list_head *tcset_head; +struct list_head *task_pos;struct list_head *tasks_head;struct list_head *mg_tasks_head;struct css_set *cur_cset; +struct css_set *cur_pcset;struct task_struct *cur_task;struct list_head iters_node;/* css_set->task_iters */ };
kernel/cgroup/cgroup.c +67 -14
126 lines not on this page · raw message
Signature · 7 lines
1.8.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Waiman Long
maintainerRFC PATCH 5/14 cgroup: implement cgroup v2 thread support
In reply to Waiman LongFrom: Tejun Heo <[email protected]>
This patch implements cgroup v2 thread support. The goal of the thread mode is supporting hierarchical accounting and control at thread granularity while staying inside the resource domain model which allows coordination across different resource controllers and handling of anonymous resource consumptions.
Once thread mode is enabled on a cgroup, the threads of the processes which are in its subtree can be placed inside the subtree without being restricted by process granularity or no-internal-process constraint. Note that the threads aren't allowed to escape to a different threaded subtree. To be used inside a threaded subtree, a controller should explicitly support threaded mode and be able to handle internal competition in the way which is appropriate for the resource.
The root of a threaded subtree, where thread mode is enabled in the first place, is called the thread root and serves as the resource domain for the whole subtree. This is the last cgroup where non-threaded controllers are operational and where all the domain-level resource consumptions in the subtree are accounted. This allows threaded controllers to operate at thread granularity when requested while staying inside the scope of system-level resource distribution.
Internally, in a threaded subtree, each css_set has its ->proc_cset pointing to a matching css_set which belongs to the thread root. This ensures that thread root level cgroup_subsys_state for all threaded controllers are readily accessible for domain-level operations.
This patch enables threaded mode for the pids and perf_events controllers. Neither has to worry about domain-level resource consumptions and it's enough to simply set the flag.
For more details on the interface and behavior of the thread mode, please refer to the section 2-2-2 in Documentation/cgroup-v2.txt added by this patch. Note that the documentation update is not complete as the rest of the documentation needs to be updated accordingly. Rolling those updates into this patch can be confusing so that will be separate patches.
--- Documentation/cgroup-v2.txt | 75 +++++++++++++- include/linux/cgroup-defs.h | 16 +++ kernel/cgroup/cgroup.c | 240 +++++++++++++++++++++++++++++++++++++++++++- kernel/cgroup/pids.c | 1 + kernel/events/core.c | 1 + 5 files changed, 326 insertions(+), 7 deletions(-)
Documentation/cgroup-v2.txt +73 -2
@@ -16,7 +16,9 @@ CONTENTS 1-2. What is cgroup? 2. Basic Operations 2-1. Mounting - 2-2. Organizing Processes + 2-2. Organizing Processes and Threads + 2-2-1. Processes + 2-2-2. Threads 2-3. [Un]populated Notification 2-4. Controlling Controllers 2-4-1. Enabling and Disabling
@@ -150,7 +152,9 @@ and experimenting easier, the kernel parameter cgroup_no_v1= allows disabling controllers in v1 and make them always available in v2. -2-2. Organizing Processes +2-2. Organizing Processes and Threads + +2-2-1. Processes Initially, only the root cgroup exists to which all processes belong. A child cgroup can be created by creating a sub-directory.
@@ -201,6 +205,73 @@ is removed subsequently, " (deleted)" is appended to the path. 0::/test-cgroup/test-cgroup-nested (deleted) +2-2-2. Threads + +cgroup v2 supports thread granularity for a subset of controllers to +support use cases requiring hierarchical resource distribution across +the threads of a group of processes. By default, all threads of a +process belong to the same cgroup, which also serves as the resource +domain to host resource consumptions which are not specific to a +process or thread. The thread mode allows threads to be spread across +a subtree while still maintaining the common resource domain for them. + +Enabling thread mode on a subtree makes it threaded. The root of a +threaded subtree is called thread root and serves as the resource +domain for the entire subtree. In a threaded subtree, threads of a +process can be put in different cgroups and are not subject to the no +internal process constraint - threaded controllers can be enabled on +non-leaf cgroups whether they have threads in them or not. + +To enable the thread mode, the following conditions must be met. + +- The thread root doesn't have any child cgroups. + +- The thread root doesn't have any controllers enabled. + +Thread mode can be enabled by writing "enable" to "cgroup.threads" +file. + + # echo enable > cgroup.threads + +Inside a threaded subtree, "cgroup.threads" can be read and contains +the list of the thread IDs of all threads in the cgroup. Except that +the operations are per-thread instead of per-process, "cgroup.threads" +has the same format and behaves the same way as "cgroup.procs". + +The thread root serves as the resource domain for the whole subtree, +and, while the threads can be scattered across the subtree, all the +processes are considered to be in the thread root. "cgroup.procs" in +a thread root contains the PIDs of all processes in the subtree and is +not readable in the subtree proper. However, "cgroup.procs" can be +written to from anywhere in the subtree to migrate all threads of the +matching process to the cgroup. + +Only threaded controllers can be enabled in a threaded subtree. When +a threaded controller is enabled inside a threaded subtree, it only +accounts for and controls resource consumptions associated with the +threads in the cgroup and its descendants. All consumptions which +aren't tied to a specific thread belong to the thread root. + +Because a threaded subtree is exempt from no internal process +constraint, a threaded controller must be able to handle competition +between threads in a non-leaf cgroup and its child cgroups. Each +threaded controller defines how such competitions are handled. + +To disable the thread mode, the following conditions must be met. + +- The cgroup is a thread root. Thread mode can't be disabled + partially in the subtree. + +- The thread root doesn't have any child cgroups. + +- The thread root doesn't have any controllers enabled. + +Thread mode can be disabled by writing "disable" to "cgroup.threads" +file. + + # echo disable > cgroup.threads + + 2-3. [Un]populated Notification Each non-root cgroup has a "cgroup.events" file which contains
include/linux/cgroup-defs.h +16 -0
@@ -226,6 +226,10 @@ struct css_set {struct cgroup *mg_dst_cgrp;struct css_set *mg_dst_cset; +/* used while updating ->proc_cset to enable/disable threaded mode */ +struct list_head pcset_preload_node; +struct css_set *pcset_preload; +/* dead and being drained, ignore for migration */ bool dead;
@@ -497,6 +501,18 @@ struct cgroup_subsys { bool implicit_on_dfl:1;/* +* If %true, the controller, supports threaded mode on the default +* hierarchy. In a threaded subtree, both process granularity and +* no-internal-process constraint are ignored and a threaded +* controllers should be able to handle that. +* +* Note that as an implicit controller is automatically enabled on +* all cgroups on the default hierarchy, it should also be +* threaded. implicit && !threaded is not supported. +*/ + bool threaded:1; + +/* * If %false, this subsystem is properly hierarchical - * configuration, resource accounting and restriction on a parent * cgroup cover those of its children. If %true, hierarchy support
kernel/cgroup/cgroup.c +235 -5
305 lines not on this page · raw message
kernel/cgroup/pids.c +1 -0
@@ -345,4 +345,5 @@ struct cgroup_subsys pids_cgrp_subsys = { .free = pids_free, .legacy_cftypes = pids_files, .dfl_cftypes = pids_files, + .threaded = true, };
kernel/events/core.c +1 -0
@@ -11129,5 +11129,6 @@ struct cgroup_subsys perf_event_cgrp_subsys = {* controller is not mounted on a legacy hierarchy. */ .implicit_on_dfl = true, + .threaded = true, };#endif /* CONFIG_CGROUP_PERF */
Signature · 7 lines
1.8.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Waiman Long
maintainerRFC PATCH 6/14 cgroup: Fix reference counting bug in cgroup_procs_write()
In reply to Waiman LongThe cgroup_procs_write_start() took a reference to the task structure which was not properly released within cgroup_procs_write() and so on. So a put_task_struct() call is added to cgroup_procs_write_finish() to match the get_task_struct() in cgroup_procs_write_start() to fix this reference counting error.
--- kernel/cgroup/cgroup-internal.h | 2 +- kernel/cgroup/cgroup-v1.c | 2 +- kernel/cgroup/cgroup.c | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-)
kernel/cgroup/cgroup-internal.h +1 -1
@@ -181,7 +181,7 @@ int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader, bool threadgroup);struct task_struct *cgroup_procs_write_start (char *buf,bool threadgroup) __acquires(&cgroup_threadgroup_rwsem); -void cgroup_procs_write_finish(void) +void cgroup_procs_write_finish(struct task_struct *task) __releases(&cgroup_threadgroup_rwsem);void cgroup_lock_and_drain_offline (struct cgroup *cgrp);
kernel/cgroup/cgroup-v1.c +1 -1
@@ -549,7 +549,7 @@ static ssize_t __cgroup1_procs_write(struct kernfs_open_file *of, ret =cgroup_attach_task (cgrp, task, threadgroup); out_finish: -cgroup_procs_write_finish (); +cgroup_procs_write_finish (task); out_unlock:cgroup_kn_unlock (of->kn);
kernel/cgroup/cgroup.c +6 -4
@@ -2487,12 +2487,15 @@ struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup)return tsk; } -void cgroup_procs_write_finish (void ) +void cgroup_procs_write_finish (struct task_struct *task) __releases(&cgroup_threadgroup_rwsem) {struct cgroup_subsys *ss;int ssid; +/* release reference from cgroup_procs_write_start() */ +put_task_struct (task); +percpu_up_write (&cgroup_threadgroup_rwsem);for_each_subsys (ss, ssid)if (ss->post_attach)
@@ -3295,7 +3298,6 @@ static int cgroup_addrm_files(struct cgroup_subsys_state *css,static int cgroup_apply_cftypes (struct cftype *cfts,bool is_add) { -LIST_HEAD (pending);struct cgroup_subsys *ss = cfts[0 ].ss;struct cgroup *root = &ss->root->cgrp;struct cgroup_subsys_state *css;
@@ -4060,7 +4062,7 @@ static ssize_t cgroup_procs_write(struct kernfs_open_file *of, ret =cgroup_attach_task (cgrp, task, true); out_finish: -cgroup_procs_write_finish (); +cgroup_procs_write_finish (task); out_unlock:cgroup_kn_unlock (of->kn);
@@ -4130,7 +4132,7 @@ static ssize_t cgroup_threads_write(struct kernfs_open_file *of, ret =cgroup_attach_task (cgrp, task, false); out_finish: -cgroup_procs_write_finish (); +cgroup_procs_write_finish (task); out_unlock:cgroup_kn_unlock (of->kn);
Signature · 7 lines
1.8.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Waiman Long
maintainerRFC PATCH 7/14 cgroup: Move debug cgroup to its own file
In reply to Waiman LongThe debug cgroup currently resides within cgroup-v1.c and is enabled only for v1 cgroup. To enable the debug cgroup also for v2, it makes sense to put the code into its own file as it will no longer be v1 specific. The only change in this patch is the expansion of cgroup_task_count() within the debug_taskcount_read() function.
--- kernel/cgroup/Makefile | 1 + kernel/cgroup/cgroup-v1.c | 147 ----------------------------------------- kernel/cgroup/debug.c | 165 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+), 147 deletions(-) create mode 100644 kernel/cgroup/debug.c
kernel/cgroup/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-$(CONFIG_CGROUP_FREEZER) += freezer.o obj-$(CONFIG_CGROUP_PIDS) += pids.o obj-$(CONFIG_CGROUP_RDMA) += rdma.o obj-$(CONFIG_CPUSETS) += cpuset.o +obj-$(CONFIG_CGROUP_DEBUG) += debug.o
kernel/cgroup/cgroup-v1.c +0 -147
150 lines not on this page · raw message
kernel/cgroup/debug.c new file +165 -0
165 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 8/14 cgroup: Keep accurate count of tasks in each css_set
In reply to Waiman LongThe reference count in the css_set data structure was used as a proxy of the number of tasks attached to that css_set. However, that count is actually not an accurate measure especially with thread mode support. So a new variable task_count is added to the css_set to keep track of the actual task count. This new variable is protected by the css_set_lock. Functions that require the actual task count are updated to use the new variable.
--- include/linux/cgroup-defs.h | 3 +++ kernel/cgroup/cgroup-v1.c | 6 +----- kernel/cgroup/cgroup.c | 5 +++++ kernel/cgroup/debug.c | 6 +----- 4 files changed, 10 insertions(+), 10 deletions(-)
include/linux/cgroup-defs.h +3 -0
@@ -158,6 +158,9 @@ struct css_set {/* reference count */ atomic_t refcount; +/* internal task count, protected by css_set_lock */ +int task_count; +/* * If not threaded, the following points to self. If threaded, to * a cset which belongs to the top cgroup of the threaded subtree.
kernel/cgroup/cgroup-v1.c +1 -5
@@ -334,10 +334,6 @@ static struct cgroup_pidlist *cgroup_pidlist_find_create(struct cgroup *cgrp,/** * cgroup_task_count - count the number of tasks in a cgroup. * @cgrp: the cgroup in question -* -* Return the number of tasks in the cgroup. The returned number can be -* higher than the actual number of tasks due to css_set references from -* namespace roots and temporary usages. */ static int cgroup_task_count (const struct cgroup *cgrp) {
@@ -346,7 +342,7 @@ static int cgroup_task_count(const struct cgroup *cgrp)spin_lock_irq (&css_set_lock);list_for_each_entry (link, &cgrp->cset_links, cset_link) - count +=atomic_read (&link->cset->refcount); + count += link->cset->task_count;spin_unlock_irq (&css_set_lock);return count; }
kernel/cgroup/cgroup.c +5 -0
@@ -1671,6 +1671,7 @@ static void cgroup_enable_task_cg_lists(void)css_set_update_populated (cset, true);list_add_tail (&p->cg_list, &cset->tasks);get_css_set (cset); + cset->task_count++; }spin_unlock (&p->sighand->siglock); }while_each_thread (g, p);
@@ -2154,8 +2155,10 @@ static int cgroup_migrate_execute(struct cgroup_mgctx *mgctx)struct css_set *to_cset = cset->mg_dst_cset;get_css_set (to_cset); + to_cset->task_count++;css_set_move_task (task, from_cset, to_cset, true);put_css_set_locked (from_cset); + from_cset->task_count--; } }spin_unlock_irq (&css_set_lock);
@@ -5150,6 +5153,7 @@ void cgroup_post_fork(struct task_struct *child) cset =task_css_set (current);if (list_empty (&child->cg_list)) {get_css_set (cset); + cset->task_count++;css_set_move_task (child,NULL , cset, false); }spin_unlock_irq (&css_set_lock);
@@ -5199,6 +5203,7 @@ void cgroup_exit(struct task_struct *tsk)if (!list_empty (&tsk->cg_list)) {spin_lock_irq (&css_set_lock);css_set_move_task (tsk, cset,NULL , false); + cset->task_count--;spin_unlock_irq (&css_set_lock); }else {get_css_set (cset);
kernel/cgroup/debug.c +1 -5
@@ -23,10 +23,6 @@ static void debug_css_free(struct cgroup_subsys_state *css)/* * debug_taskcount_read - return the number of tasks in a cgroup. * @cgrp: the cgroup in question -* -* Return the number of tasks in the cgroup. The returned number can be -* higher than the actual number of tasks due to css_set references from -* namespace roots and temporary usages. */ static u64 debug_taskcount_read (struct cgroup_subsys_state *css,struct cftype *cft)
@@ -37,7 +33,7 @@ static u64 debug_taskcount_read(struct cgroup_subsys_state *css,spin_lock_irq (&css_set_lock);list_for_each_entry (link, &cgrp->cset_links, cset_link) - count +=atomic_read (&link->cset->refcount); + count += link->cset->task_count;spin_unlock_irq (&css_set_lock);return count; }
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 9/14 cgroup: Make debug cgroup support v2 and thread mode
In reply to Waiman LongBesides supporting cgroup v2 and thread mode, the following changes are also made:
1) current_* cgroup files now resides only at the root as we don't need duplicated files of the same function all over the cgroup hierarchy.
2) The cgroup_css_links_read() function is modified to report the number of tasks that are skipped because of overflow.
3) The relationship between proc_cset and threaded_csets are displayed.
4) The number of extra unaccounted references are displayed.
5) The status of being a thread root or threaded cgroup is displayed.
6) The current_css_set_read() function now prints out the addresses of the css'es associated with the current css_set.
7) A new cgroup_subsys_states file is added to display the css objects associated with a cgroup.
--- kernel/cgroup/debug.c | 151 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 134 insertions(+), 17 deletions(-)
kernel/cgroup/debug.c +134 -17
@@ -38,10 +38,37 @@ static u64 debug_taskcount_read(struct cgroup_subsys_state *css,return count; } -static u64 current_css_set_read (struct cgroup_subsys_state *css, -struct cftype *cft) +static int current_css_set_read (struct seq_file *seq,void *v) { -return (u64 )(unsigned long )current->cgroups; +struct css_set *cset; +struct cgroup_subsys *ss; +struct cgroup_subsys_state *css; +int i, refcnt; + +mutex_lock (&cgroup_mutex); +spin_lock_irq (&css_set_lock); +rcu_read_lock (); + cset =rcu_dereference (current->cgroups); + refcnt =atomic_read (&cset->refcount); +seq_printf (seq,"css_set %pK %d" , cset, refcnt); +if (refcnt > cset->task_count) +seq_printf (seq," +%d" , refcnt - cset->task_count); +seq_puts (seq,"\n" ); + +/* +* Print the css'es stored in the current css_set. +*/ +for_each_subsys (ss, i) { + css = cset->subsys[ss->id]; +if (!css) +continue ; +seq_printf (seq,"%2d: %-4s\t- %lx[%d]\n" , ss->id, ss->name, + (unsigned long )css, css->id); + } +rcu_read_unlock (); +spin_unlock_irq (&css_set_lock); +mutex_unlock (&cgroup_mutex); +return 0 ; } static u64 current_css_set_refcount_read(struct cgroup_subsys_state *css,
@@ -86,31 +113,111 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v) {struct cgroup_subsys_state *css =seq_css (seq);struct cgrp_cset_link *link; +int dead_cnt =0 , extra_refs =0 , threaded_csets =0 ;spin_lock_irq (&css_set_lock); +if (css->cgroup->proc_cgrp) +seq_puts (seq, (css->cgroup->proc_cgrp == css->cgroup) + ?"[thread root]\n" :"[threaded]\n" ); +list_for_each_entry (link, &css->cgroup->cset_links, cset_link) {struct css_set *cset = link->cset;struct task_struct *task;int count =0 ; +int refcnt =atomic_read (&cset->refcount); -seq_printf (seq,"css_set %pK\n" , cset); +/* +* Print out the proc_cset and threaded_cset relationship +* and highlight difference between refcount and task_count. +*/ +seq_printf (seq,"css_set %pK" , cset); +if (cset->proc_cset != cset) { + threaded_csets++; +seq_printf (seq,"=>%pK" , cset->proc_cset); + } +if (!list_empty (&cset->threaded_csets)) { +struct css_set *tcset; +int idx =0 ; + +list_for_each_entry (tcset, &cset->threaded_csets, + threaded_csets_node) { +seq_puts (seq, idx ?"," :"<=" ); +seq_printf (seq,"%pK" , tcset); + idx++; + } + }else { +seq_printf (seq," %d" , refcnt); +if (refcnt - cset->task_count >0 ) { +int extra = refcnt - cset->task_count; + +seq_printf (seq," +%d" , extra); +/* +* Take out the one additional reference in +* init_css_set. +*/ +if (cset == &init_css_set) + extra--; + extra_refs += extra; + } + } +seq_puts (seq,"\n" );list_for_each_entry (task, &cset->tasks, cg_list) { -if (count++ >MAX_TASKS_SHOWN_PER_CSS ) - goto overflow; -seq_printf (seq," task %d\n" ,task_pid_vnr (task)); +if (count++ <=MAX_TASKS_SHOWN_PER_CSS ) +seq_printf (seq," task %d\n" , +task_pid_vnr (task)); }list_for_each_entry (task, &cset->mg_tasks, cg_list) { -if (count++ >MAX_TASKS_SHOWN_PER_CSS ) - goto overflow; -seq_printf (seq," task %d\n" ,task_pid_vnr (task)); +if (count++ <=MAX_TASKS_SHOWN_PER_CSS ) +seq_printf (seq," task %d\n" , +task_pid_vnr (task)); } -continue ; - overflow: -seq_puts (seq," ...\n" ); +/* show # of overflowed tasks */ +if (count >MAX_TASKS_SHOWN_PER_CSS ) +seq_printf (seq," ... (%d)\n" , + count -MAX_TASKS_SHOWN_PER_CSS ); + +if (cset->dead) { +seq_puts (seq," [dead]\n" ); + dead_cnt++; + } + +WARN_ON (count != cset->task_count); }spin_unlock_irq (&css_set_lock); + +if (!dead_cnt && !extra_refs && !threaded_csets) +return 0 ; + +seq_puts (seq,"\n" ); +if (threaded_csets) +seq_printf (seq,"threaded css_sets = %d\n" , threaded_csets); +if (extra_refs) +seq_printf (seq,"extra references = %d\n" , extra_refs); +if (dead_cnt) +seq_printf (seq,"dead css_sets = %d\n" , dead_cnt); + +return 0 ; +} + +static int cgroup_subsys_states_read (struct seq_file *seq,void *v) +{ +struct cgroup *cgrp =seq_css (seq)->cgroup; +struct cgroup_subsys *ss; +struct cgroup_subsys_state *css; +int i; + +mutex_lock (&cgroup_mutex); +for_each_subsys (ss, i) { + css =rcu_dereference_check (cgrp->subsys[ss->id], true); +if (!css) +continue ; +seq_printf (seq,"%2d: %-4s\t- %lx[%d] %d\n" , ss->id, ss->name, + (unsigned long )css, css->id, +atomic_read (&css->online_cnt)); + } +mutex_unlock (&cgroup_mutex);return 0 ; }
@@ -128,17 +235,20 @@ static u64 releasable_read(struct cgroup_subsys_state *css, struct cftype *cft) { .name = "current_css_set", - .read_u64 = current_css_set_read, + .seq_show = current_css_set_read, + .flags = CFTYPE_ONLY_ON_ROOT, }, { .name = "current_css_set_refcount", .read_u64 = current_css_set_refcount_read, + .flags = CFTYPE_ONLY_ON_ROOT, }, { .name = "current_css_set_cg_links", .seq_show = current_css_set_cg_links_read, + .flags = CFTYPE_ONLY_ON_ROOT, }, {
@@ -147,6 +257,11 @@ static u64 releasable_read(struct cgroup_subsys_state *css, struct cftype *cft) }, { + .name = "cgroup_subsys_states", + .seq_show = cgroup_subsys_states_read, + }, + + { .name = "releasable", .read_u64 = releasable_read, },
@@ -155,7 +270,9 @@ static u64 releasable_read(struct cgroup_subsys_state *css, struct cftype *cft) };struct cgroup_subsys debug_cgrp_subsys = { - .css_alloc = debug_css_alloc, - .css_free = debug_css_free, - .legacy_cftypes = debug_files, + .css_alloc = debug_css_alloc, + .css_free = debug_css_free, + .legacy_cftypes = debug_files, + .dfl_cftypes = debug_files, + .threaded = true, };
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 10/14 cgroup: Implement new thread mode semantics
In reply to Waiman LongThe current thread mode semantics aren't sufficient to fully support threaded controllers like cpu. The main problem is that when thread mode is enabled at root (mainly for performance reason), all the non-threaded controllers cannot be supported at all.
To alleviate this problem, the roles of thread root and threaded cgroups are now further separated. Now thread mode can only be enabled on a non-root leaf cgroup whose parent will then become the thread root. All the descendants of a threaded cgroup will still need to be threaded. All the non-threaded resource will be accounted for in the thread root. Unlike the previous thread mode, however, a thread root can have non-threaded children where system resources like memory can be further split down the hierarchy.
Now we could have something like
R -- A -- B \ T1 -- T2
where R is the thread root, A and B are non-threaded cgroups, T1 and T2 are threaded cgroups. The cgroups R, T1, T2 form a threaded subtree where all the non-threaded resources are accounted for in R. The no internal process constraint does not apply in the threaded subtree. Non-threaded controllers need to properly handle the competition between internal processes and child cgroups at the thread root.
This model will be flexible enough to support the need of the threaded controllers.
--- Documentation/cgroup-v2.txt | 51 +++++++---- kernel/cgroup/cgroup-internal.h | 10 +++ kernel/cgroup/cgroup.c | 184 +++++++++++++++++++++++++++++++++++----- 3 files changed, 208 insertions(+), 37 deletions(-)
Documentation/cgroup-v2.txt +35 -16
@@ -222,21 +222,32 @@ process can be put in different cgroups and are not subject to the no internal process constraint - threaded controllers can be enabled on non-leaf cgroups whether they have threads in them or not. -To enable the thread mode, the following conditions must be met. +To enable the thread mode on a cgroup, the following conditions must +be met. -- The thread root doesn't have any child cgroups. +- The cgroup doesn't have any child cgroups. -- The thread root doesn't have any controllers enabled. +- The cgroup doesn't have any non-threaded controllers enabled. + +- The cgroup doesn't have any processes attached to it. Thread mode can be enabled by writing "enable" to "cgroup.threads" file. # echo enable > cgroup.threads -Inside a threaded subtree, "cgroup.threads" can be read and contains -the list of the thread IDs of all threads in the cgroup. Except that -the operations are per-thread instead of per-process, "cgroup.threads" -has the same format and behaves the same way as "cgroup.procs". +The parent of the threaded cgroup will become the thread root, if +it hasn't been a thread root yet. In other word, thread mode cannot +be enabled on the root cgroup as it doesn't have a parent cgroup. A +thread root can have child cgroups and controllers enabled before +becoming one. + +A threaded subtree includes the thread root and all the threaded child +cgroups as well as their descendants which are all threaded cgroups. +"cgroup.threads" can be read and contains the list of the thread +IDs of all threads in the cgroup. Except that the operations are +per-thread instead of per-process, "cgroup.threads" has the same +format and behaves the same way as "cgroup.procs". The thread root serves as the resource domain for the whole subtree, and, while the threads can be scattered across the subtree, all the
@@ -246,25 +257,30 @@ not readable in the subtree proper. However, "cgroup.procs" can be written to from anywhere in the subtree to migrate all threads of the matching process to the cgroup. -Only threaded controllers can be enabled in a threaded subtree. When -a threaded controller is enabled inside a threaded subtree, it only -accounts for and controls resource consumptions associated with the -threads in the cgroup and its descendants. All consumptions which -aren't tied to a specific thread belong to the thread root. +Only threaded controllers can be enabled in a non-root threaded cgroup. +When a threaded controller is enabled inside a threaded subtree, +it only accounts for and controls resource consumptions associated +with the threads in the cgroup and its descendants. All consumptions +which aren't tied to a specific thread belong to the thread root. Because a threaded subtree is exempt from no internal process constraint, a threaded controller must be able to handle competition between threads in a non-leaf cgroup and its child cgroups. Each threaded controller defines how such competitions are handled. +A new child cgroup created under a thread root will not be threaded. +Thread mode has to be explicitly enabled on each of the thread root's +children. Descendants of a threaded cgroup, however, will always be +threaded and that mode cannot be disabled. + To disable the thread mode, the following conditions must be met. -- The cgroup is a thread root. Thread mode can't be disabled - partially in the subtree. +- The cgroup is a child of a thread root. Thread mode can't be + disabled partially further down the hierarchy. -- The thread root doesn't have any child cgroups. +- The cgroup doesn't have any child cgroups. -- The thread root doesn't have any controllers enabled. +- The cgroup doesn't have any threads attached to it. Thread mode can be disabled by writing "disable" to "cgroup.threads" file.
@@ -366,6 +382,9 @@ with any other cgroups and requires special treatment from most controllers. How resource consumption in the root cgroup is governed is up to each controller. +The threaded cgroups and the thread roots are also exempt from this +restriction. + Note that the restriction doesn't get in the way if there is no enabled controller in the cgroup's "cgroup.subtree_control". This is important as otherwise it wouldn't be possible to create children of a
kernel/cgroup/cgroup-internal.h +10 -0
@@ -123,6 +123,16 @@ static inline bool notify_on_release(const struct cgroup *cgrp)return test_bit (CGRP_NOTIFY_ON_RELEASE , &cgrp->flags); } +static inline bool cgroup_is_threaded (const struct cgroup *cgrp) +{ +return cgrp->proc_cgrp && (cgrp->proc_cgrp != cgrp); +} + +static inline bool cgroup_is_thread_root (const struct cgroup *cgrp) +{ +return cgrp->proc_cgrp == cgrp; +} +void put_css_set_locked (struct css_set *cset);static inline void put_css_set (struct css_set *cset)
kernel/cgroup/cgroup.c +163 -21
273 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 11/14 sched: Misc preps for cgroup unified hierarchy interface
In reply to Waiman LongFrom: Tejun Heo <[email protected]>
Make the following changes in preparation for the cpu controller interface implementation for the unified hierarchy. This patch doesn't cause any functional differences.
* s/cpu_stats_show()/cpu_cfs_stats_show()/
* s/cpu_files/cpu_legacy_files/
* Separate out cpuacct_stats_read() from cpuacct_stats_show(). While at it, make the @val array u64 for consistency.
--- kernel/sched/core.c | 8 ++++---- kernel/sched/cpuacct.c | 29 ++++++++++++++++++----------- 2 files changed, 22 insertions(+), 15 deletions(-)
kernel/sched/core.c +4 -4
@@ -7209,7 +7209,7 @@ static int __cfs_schedulable(struct task_group *tg, u64 period, u64 quota)return ret; } -static int cpu_stats_show (struct seq_file *sf,void *v) +static int cpu_cfs_stats_show (struct seq_file *sf,void *v) {struct task_group *tg =css_tg (seq_css (sf));struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
@@ -7249,7 +7249,7 @@ static u64 cpu_rt_period_read_uint(struct cgroup_subsys_state *css, }#endif /* CONFIG_RT_GROUP_SCHED */ -static struct cftype cpu_files[] = { +static struct cftype cpu_legacy_files[] = {#ifdef CONFIG_FAIR_GROUP_SCHED { .name = "shares",
@@ -7270,7 +7270,7 @@ static u64 cpu_rt_period_read_uint(struct cgroup_subsys_state *css, }, { .name = "stat", - .seq_show = cpu_stats_show, + .seq_show = cpu_cfs_stats_show, },#endif #ifdef CONFIG_RT_GROUP_SCHED
@@ -7296,7 +7296,7 @@ struct cgroup_subsys cpu_cgrp_subsys = { .fork = cpu_cgroup_fork, .can_attach = cpu_cgroup_can_attach, .attach = cpu_cgroup_attach, - .legacy_cftypes = cpu_files, + .legacy_cftypes = cpu_legacy_files, .early_init = true, };
kernel/sched/cpuacct.c +18 -11
@@ -276,26 +276,33 @@ static int cpuacct_all_seq_show(struct seq_file *m, void *V)return 0 ; } -static int cpuacct_stats_show (struct seq_file *sf,void *v) +static void cpuacct_stats_read (struct cpuacct *ca, +u64 (*val)[CPUACCT_STAT_NSTATS ]) { -struct cpuacct *ca =css_ca (seq_css (sf)); -s64 val[CPUACCT_STAT_NSTATS ];int cpu; -int stat; -memset (val,0 ,sizeof (val)); +memset (val,0 ,sizeof (*val)); +for_each_possible_cpu (cpu) {u64 *cpustat =per_cpu_ptr (ca->cpustat, cpu)->cpustat; - val[CPUACCT_STAT_USER ] += cpustat[CPUTIME_USER ]; - val[CPUACCT_STAT_USER ] += cpustat[CPUTIME_NICE ]; - val[CPUACCT_STAT_SYSTEM ] += cpustat[CPUTIME_SYSTEM ]; - val[CPUACCT_STAT_SYSTEM ] += cpustat[CPUTIME_IRQ ]; - val[CPUACCT_STAT_SYSTEM ] += cpustat[CPUTIME_SOFTIRQ ]; + (*val)[CPUACCT_STAT_USER ] += cpustat[CPUTIME_USER ]; + (*val)[CPUACCT_STAT_USER ] += cpustat[CPUTIME_NICE ]; + (*val)[CPUACCT_STAT_SYSTEM ] += cpustat[CPUTIME_SYSTEM ]; + (*val)[CPUACCT_STAT_SYSTEM ] += cpustat[CPUTIME_IRQ ]; + (*val)[CPUACCT_STAT_SYSTEM ] += cpustat[CPUTIME_SOFTIRQ ]; } +} + +static int cpuacct_stats_show (struct seq_file *sf,void *v) +{ +u64 val[CPUACCT_STAT_NSTATS ]; +int stat; + +cpuacct_stats_read (css_ca (seq_css (sf)), &val);for (stat =0 ; stat <CPUACCT_STAT_NSTATS ; stat++) { -seq_printf (sf,"%s %lld\n" , +seq_printf (sf,"%s %llu\n" , cpuacct_stat_desc[stat], (long long )nsec_to_clock_t (val[stat])); }
Signature · 7 lines
1.8.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Waiman Long
maintainerRFC PATCH 12/14 sched: Implement interface for cgroup unified hierarchy
In reply to Waiman LongFrom: Tejun Heo <[email protected]>
While the cpu controller doesn't have any functional problems, there are a couple interface issues which can be addressed in the v2 interface.
* cpuacct being a separate controller. This separation is artificial and rather pointless as demonstrated by most use cases co-mounting the two controllers. It also forces certain information to be accounted twice.
* Use of different time units. Writable control knobs use microseconds, some stat fields use nanoseconds while other cpuacct stat fields use centiseconds.
* Control knobs which can't be used in the root cgroup still show up in the root.
* Control knob names and semantics aren't consistent with other controllers.
This patchset implements cpu controller's interface on the unified hierarchy which adheres to the controller file conventions described in Documentation/cgroup-v2.txt. Overall, the following changes are made.
* cpuacct is implictly enabled and disabled by cpu and its information is reported through "cpu.stat" which now uses microseconds for all time durations. All time duration fields now have "_usec" appended to them for clarity. While this doesn't solve the double accounting immediately, once majority of users switch to v2, cpu can directly account and report the relevant stats and cpuacct can be disabled on the unified hierarchy.
Note that cpuacct.usage_percpu is currently not included in "cpu.stat". If this information is actually called for, it can be added later.
* "cpu.shares" is replaced with "cpu.weight" and operates on the standard scale defined by CGROUP_WEIGHT_MIN/DFL/MAX (1, 100, 10000). The weight is scaled to scheduler weight so that 100 maps to 1024 and the ratio relationship is preserved - if weight is W and its scaled value is S, W / 100 == S / 1024. While the mapped range is a bit smaller than the orignal scheduler weight range, the dead zones on both sides are relatively small and covers wider range than the nice value mappings. This file doesn't make sense in the root cgroup and isn't create on root.
* "cpu.cfs_quota_us" and "cpu.cfs_period_us" are replaced by "cpu.max" which contains both quota and period.
* "cpu.rt_runtime_us" and "cpu.rt_period_us" are replaced by "cpu.rt.max" which contains both runtime and period.
v2: cpu_stats_show() was incorrectly using CONFIG_FAIR_GROUP_SCHED for
CFS bandwidth stats and also using raw division for u64. Use CONFIG_CFS_BANDWITH and do_div() instead.
The semantics of "cpu.rt.max" is not fully decided yet. Dropped for now.
--- kernel/sched/core.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/cpuacct.c | 25 +++++++++ kernel/sched/cpuacct.h | 5 ++ 3 files changed, 171 insertions(+)
kernel/sched/core.c +141 -0
@@ -7288,6 +7288,139 @@ static u64 cpu_rt_period_read_uint(struct cgroup_subsys_state *css, { }/* Terminate */ }; +static int cpu_stats_show (struct seq_file *sf,void *v) +{ +cpuacct_cpu_stats_show (sf); + +#ifdef CONFIG_CFS_BANDWIDTH + { +struct task_group *tg =css_tg (seq_css (sf)); +struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth; +u64 throttled_usec; + + throttled_usec = cfs_b->throttled_time; +do_div (throttled_usec,NSEC_PER_USEC ); + +seq_printf (sf,"nr_periods %d\n" +"nr_throttled %d\n" +"throttled_usec %llu\n" , + cfs_b->nr_periods, cfs_b->nr_throttled, + throttled_usec); + } +#endif +return 0 ; +} + +#ifdef CONFIG_FAIR_GROUP_SCHED +static u64 cpu_weight_read_u64 (struct cgroup_subsys_state *css, +struct cftype *cft) +{ +struct task_group *tg =css_tg (css); +u64 weight =scale_load_down (tg->shares); + +return DIV_ROUND_CLOSEST_ULL (weight *CGROUP_WEIGHT_DFL ,1024 ); +} + +static int cpu_weight_write_u64 (struct cgroup_subsys_state *css, +struct cftype *cftype,u64 weight) +{ +/* +* cgroup weight knobs should use the common MIN, DFL and MAX +* values which are 1, 100 and 10000 respectively. While it loses +* a bit of range on both ends, it maps pretty well onto the shares +* value used by scheduler and the round-trip conversions preserve +* the original value over the entire range. +*/ +if (weight <CGROUP_WEIGHT_MIN || weight >CGROUP_WEIGHT_MAX ) +return -ERANGE ; + + weight =DIV_ROUND_CLOSEST_ULL (weight *1024 ,CGROUP_WEIGHT_DFL ); + +return sched_group_set_shares (css_tg (css),scale_load (weight)); +} +#endif + +static void __maybe_unused cpu_period_quota_print (struct seq_file *sf, +long period,long quota) +{ +if (quota <0 ) +seq_puts (sf,"max" ); +else +seq_printf (sf,"%ld" , quota); + +seq_printf (sf," %ld\n" , period); +} + +/* caller should put the current value in *@periodp before calling */ +static int __maybe_unused cpu_period_quota_parse (char *buf, +u64 *periodp,u64 *quotap) +{ +char tok[21 ];/* U64_MAX */ + +if (!sscanf (buf,"%s %llu" , tok, periodp)) +return -EINVAL ; + + *periodp *=NSEC_PER_USEC ; + +if (sscanf (tok,"%llu" , quotap)) + *quotap *=NSEC_PER_USEC ; +else if (!strcmp (tok,"max" )) + *quotap =RUNTIME_INF ; +else +return -EINVAL ; + +return 0 ; +} + +#ifdef CONFIG_CFS_BANDWIDTH +static int cpu_max_show (struct seq_file *sf,void *v) +{ +struct task_group *tg =css_tg (seq_css (sf)); + +cpu_period_quota_print (sf,tg_get_cfs_period (tg),tg_get_cfs_quota (tg)); +return 0 ; +} + +static ssize_t cpu_max_write (struct kernfs_open_file *of, +char *buf,size_t nbytes,loff_t off) +{ +struct task_group *tg =css_tg (of_css (of)); +u64 period =tg_get_cfs_period (tg); +u64 quota; +int ret; + + ret =cpu_period_quota_parse (buf, &period, "a); +if (!ret) + ret =tg_set_cfs_bandwidth (tg, period, quota); +return ret ?: nbytes; +} +#endif + +static struct cftype cpu_files[] = { + { + .name ="stat" , + .flags =CFTYPE_NOT_ON_ROOT , + .seq_show = cpu_stats_show, + }, +#ifdef CONFIG_FAIR_GROUP_SCHED + { + .name ="weight" , + .flags =CFTYPE_NOT_ON_ROOT , + .read_u64 = cpu_weight_read_u64, + .write_u64 = cpu_weight_write_u64, + }, +#endif +#ifdef CONFIG_CFS_BANDWIDTH + { + .name ="max" , + .flags =CFTYPE_NOT_ON_ROOT , + .seq_show = cpu_max_show, + .write = cpu_max_write, + }, +#endif + { }/* terminate */ +}; +struct cgroup_subsys cpu_cgrp_subsys = { .css_alloc = cpu_cgroup_css_alloc, .css_online = cpu_cgroup_css_online,
@@ -7297,7 +7430,15 @@ struct cgroup_subsys cpu_cgrp_subsys = { .can_attach = cpu_cgroup_can_attach, .attach = cpu_cgroup_attach, .legacy_cftypes = cpu_legacy_files, + .dfl_cftypes = cpu_files, .early_init = true, +#ifdef CONFIG_CGROUP_CPUACCT +/* +* cpuacct is enabled together with cpu on the unified hierarchy +* and its stats are reported through "cpu.stat". +*/ + .depends_on = 1 << cpuacct_cgrp_id, +#endif };#endif /* CONFIG_CGROUP_SCHED */
kernel/sched/cpuacct.c +25 -0
@@ -347,6 +347,31 @@ static int cpuacct_stats_show(struct seq_file *sf, void *v) { }/* terminate */ }; +/* used to print cpuacct stats in cpu.stat on the unified hierarchy */ +void cpuacct_cpu_stats_show (struct seq_file *sf) +{ +struct cgroup_subsys_state *css; +u64 usage, val[CPUACCT_STAT_NSTATS ]; + + css =cgroup_get_e_css (seq_css (sf)->cgroup, &cpuacct_cgrp_subsys); + + usage =cpuusage_read (css,seq_cft (sf)); +cpuacct_stats_read (css_ca (css), &val); + + val[CPUACCT_STAT_USER ] *=TICK_NSEC ; + val[CPUACCT_STAT_SYSTEM ] *=TICK_NSEC ; +do_div (usage,NSEC_PER_USEC ); +do_div (val[CPUACCT_STAT_USER ],NSEC_PER_USEC ); +do_div (val[CPUACCT_STAT_SYSTEM ],NSEC_PER_USEC ); + +seq_printf (sf,"usage_usec %llu\n" +"user_usec %llu\n" +"system_usec %llu\n" , + usage, val[CPUACCT_STAT_USER ], val[CPUACCT_STAT_SYSTEM ]); + +css_put (css); +} +/* * charge this task's execution time to its accounting group. *
kernel/sched/cpuacct.h +5 -0
@@ -2,6 +2,7 @@extern void cpuacct_charge (struct task_struct *tsk,u64 cputime);extern void cpuacct_account_field (struct task_struct *tsk,int index,u64 val); +extern void cpuacct_cpu_stats_show (struct seq_file *sf);#else
@@ -14,4 +15,8 @@ static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime) { } +static inline void cpuacct_cpu_stats_show (struct seq_file *sf) +{ +} +#endif
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 13/14 sched: Make cpu/cpuacct threaded controllers
In reply to Waiman LongMake cpu and cpuacct cgroup controllers usable within a threaded cgroup.
--- kernel/sched/core.c | 1 + kernel/sched/cpuacct.c | 1 + 2 files changed, 2 insertions(+)
kernel/sched/core.c +1 -0
@@ -7432,6 +7432,7 @@ struct cgroup_subsys cpu_cgrp_subsys = { .legacy_cftypes = cpu_legacy_files, .dfl_cftypes = cpu_files, .early_init = true, + .threaded = true,#ifdef CONFIG_CGROUP_CPUACCT /* * cpuacct is enabled together with cpu on the unified hierarchy
kernel/sched/cpuacct.c +1 -0
@@ -414,4 +414,5 @@ struct cgroup_subsys cpuacct_cgrp_subsys = { .css_free = cpuacct_css_free, .legacy_cftypes = files, .early_init = true, + .threaded = true, };
Signature · 1 line
1.8.3.1
Waiman Long
maintainerRFC PATCH 14/14 cgroup: Enable separate control knobs for thread root internal processes
In reply to Waiman LongInternal processes are allowed in a thread root of the cgroup v2 default hierarchy. For those resource domain controllers that don't want to deal with resource competition between internal processes and child cgroups, there is now the option of specifying the sep_res_domain flag in their cgroup_subsys data structure. This flag will tell the cgroup core to create a special directory "cgroup.self" under the thread root to hold their resource control knobs for all the processes within the threaded subtree.
User applications can then tune the control knobs in the "cgroup.self" directory as if all the threaded subtree processes are under it for resoruce tracking and controlling purpose.
This directory name is reserved and so it cannot be created or deleted directly. Moreover, sub-directory cannot be created under it.
This sep_res_domain flag is turned on in the memcg to showcase its effect.
--- Documentation/cgroup-v2.txt | 20 ++++++++ include/linux/cgroup-defs.h | 15 ++++++ kernel/cgroup/cgroup.c | 122 +++++++++++++++++++++++++++++++++++++++----- kernel/cgroup/debug.c | 6 +++ mm/memcontrol.c | 1 + 5 files changed, 150 insertions(+), 14 deletions(-)
Documentation/cgroup-v2.txt +20 -0
@@ -393,6 +393,26 @@ cgroup must create children and transfer all its processes to the children before enabling controllers in its "cgroup.subtree_control" file. +2-4-4. Resource Domain Controllers + +As internal processes are allowed in a threaded subtree, a non-threaded +controller at a thread root cgroup has to properly manage resource +competition between internal processes and other child non-threaded +cgroups. However, a controller can specify that it wants to have +separate resource domain to manage the resources of the processes in +the threaded subtree instead of each process individually. In this +case, a "cgroup.self" directory will be created at the thread root +to hold the resource control knobs for the processes in the threaded +subtree as if those internal processes are all under the cgroup.self +child cgroup for resource tracking and controlling purpose. + +The "cgroup.self" directory is a special directory which cannot +be created or deleted directly. No sub-directory can be created +under it and special files like "cgroup.procs" are not present so +tasks cannot be moved directly into it. It is created when a cgroup +becomes the thread root and have controllers that request separate +resource domains. It will be removed when that cgroup is not a thread +root anymore. 2-5. Delegation
include/linux/cgroup-defs.h +15 -0
@@ -65,6 +65,7 @@ enum {enum {CGRP_ROOT_NOPREFIX = (1 <<1 ),/* mounted subsystems have no named prefix */ CGRP_ROOT_XATTR = (1 <<2 ),/* supports extended attributes */ +CGRP_RESOURCE_DOMAIN = (1 <<3 ),/* thread root resource domain */ };/* cftype->flags */
@@ -293,6 +294,9 @@ struct cgroup {struct cgroup_root *root; +/* Pointer to separate resource domain for thread root */ +struct cgroup *resource_domain; +/* * List of cgrp_cset_links pointing at css_sets with tasks in this * cgroup. Protected by css_set_lock.
@@ -516,6 +520,17 @@ struct cgroup_subsys { bool threaded:1;/* +* If %true, the controller will need a separate resource domain in +* a thread root to avoid internal processes associated with the +* threaded subtree to compete with other child cgroups. This is done +* by having a separate set of knobs in the cgroup.self directory. +* These knobs will control how much resources are allocated to the +* processes in the threaded subtree. Only !thread controllers should +* have this flag turned on. +*/ + bool sep_res_domain:1; + +/* * If %false, this subsystem is properly hierarchical - * configuration, resource accounting and restriction on a parent * cgroup cover those of its children. If %true, hierarchy support
kernel/cgroup/cgroup.c +108 -14
222 lines not on this page · raw message
kernel/cgroup/debug.c +6 -0
@@ -269,10 +269,16 @@ static u64 releasable_read(struct cgroup_subsys_state *css, struct cftype *cft) { }/* terminate */ }; +/* +* Normally, threaded & sep_res_domain are mutually exclusive. +* Both are enabled here in the debug controller to enable better internal +* status tracking. +*/ struct cgroup_subsys debug_cgrp_subsys = { .css_alloc = debug_css_alloc, .css_free = debug_css_free, .legacy_cftypes = debug_files, .dfl_cftypes = debug_files, .threaded = true, + .sep_res_domain = true, };
mm/memcontrol.c +1 -0
@@ -5292,6 +5292,7 @@ struct cgroup_subsys memory_cgrp_subsys = { .dfl_cftypes = memory_files, .legacy_cftypes = mem_cgroup_legacy_files, .early_init = 0, + .sep_res_domain = true, };/**
Signature · 7 lines
1.8.3.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Waiman Long
maintainerQuoted 85 lines · Waiman Long
This patchset incorporates the following 2 patchsets from Tejun Heo:
1) cgroup v2 thread mode patchset (5 patches)
https://lkml.org/lkml/2017/2/2/592 2) CPU Controller on Control Group v2 (2 patches) https://lkml.org/lkml/2016/8/5/368Additional patches are then layered on top to implement the following new features:
1) An enhanced v2 thread mode where a thread root (root of a threaded subtree) can have non-threaded children with non-threaded controllers enabled and no internal process constraint does not apply.
2) An enhanced debug controller which dumps out more information relevant to the debugging and testing of cgroup v2 in general.
3) Separate control knobs for resource domain controllers can be enabled in a thread root to manage all the internal processes in the threaded subtree.Patches 1-5 are Tejun's cgroup v2 thread mode patchset.
Patch 6 fixes a
task_structreference counting bug introduced in patch 1.Patch 7 moves the debug cgroup out from
cgroup_v1.cinto its own file.Patch 8 keeps more accurate counts of the number of tasks associated with each
css_set.Patch 9 enhances the debug controller to provide more information relevant to the cgroup v2 thread mode to ease debugging effort.
Patch 10 implements the enhanced cgroup v2 thread mode with the following enhancements:
1) Thread roots are treated differently from threaded cgroups.
2) Thread root can now have non-threaded controllers enabled as well as non-threaded children.Patches 11-12 are Tejun's CPU controller on control group v2 patchset.
Patch 13 makes both cpu and cpuacct controllers threaded.
Patch 14 enables the creation of a special "cgroup.self" directory under the thread root to hold resource control knobs for controllers that don't want resource competiton between internal processes and non-threaded child cgroups.
Preliminary testing was done with the debug controller enabled. Things seemed to work fine so far. More rigorous testing will be needed, and any suggestions are welcome.
Tejun Heo (7):
cgroup: reorganize cgroup.procs / task write path
cgroup: add @flags tocss_task_iter_start()and implement
CSS_TASK_ITER_PROCS
cgroup: introducecgroup->proc_cgrpand threadedcss_sethandling
cgroup: implementCSS_TASK_ITER_THREADED
cgroup: implement cgroup v2 thread support
sched: Misc preps for cgroup unified hierarchy interface
sched: Implement interface for cgroup unified hierarchyWaiman Long (7):
cgroup: Fix reference counting bug incgroup_procs_write()
cgroup: Move debug cgroup to its own file
cgroup: Keep accurate count of tasks in eachcss_set
cgroup: Make debug cgroup support v2 and thread mode
cgroup: Implement new thread mode semantics
sched: Make cpu/cpuacct threaded controllers
cgroup: Enable separate control knobs for thread root internal
processesDocumentation/cgroup-v2.txt | 114 +++++- include/linux/cgroup-defs.h | 56 +++ include/linux/cgroup.h | 12 +- kernel/cgroup/Makefile | 1 + kernel/cgroup/cgroup-internal.h | 18 +- kernel/cgroup/cgroup-v1.c | 217 +++------- kernel/cgroup/cgroup.c | 862 ++++++++++++++++++++++++++++++++++------ kernel/cgroup/cpuset.c | 6 +- kernel/cgroup/debug.c | 284 +++++++++++++ kernel/cgroup/freezer.c | 6 +- kernel/cgroup/pids.c | 1 +
Quoted 9 lines
kernel/events/core.c | 1 + kernel/sched/core.c | 150 ++++++- kernel/sched/cpuacct.c | 55 ++- kernel/sched/cpuacct.h | 5 + mm/memcontrol.c | 3 +- net/core/netclassid_cgroup.c | 2 +- 17 files changed, 1478 insertions(+), 315 deletions(-) create mode 100644 kernel/cgroup/debug.c
Does anyone has time to take a look at these patches?
As the merge window is going to open up next week, I am not going to bother you guys when the merge window opens.
Cheers,
Longman
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Tejun Heo
maintainerHello, Waiman.
Quoted 4 lines · Waiman Long
Does anyone has time to take a look at these patches?
As the merge window is going to open up next week, I am not going to bother you guys when the merge window opens.
Will get to it next week. Sorry about the delay. We're deploying cgroup2 across the fleet and seeing a lot of interesting issues and I was chasing down CPU controller performance issues for the last month or so, which is now getting wrapped up.
Thanks.
Signature · 1 line
tejun