// SPDX-License-Identifier: GPL-2.0 /* * Debug controller * * WARNING: This controller is for cgroup core debugging only. * Its interfaces are unstable and subject to changes at any time.
*/ #include <linux/ctype.h> #include <linux/mm.h> #include <linux/slab.h>
/* * debug_taskcount_read - return the number of tasks in a cgroup. * @cgrp: the cgroup in question
*/ static u64 debug_taskcount_read(struct cgroup_subsys_state *css, struct cftype *cft)
{ return cgroup_task_count(css->cgroup);
}
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 = refcount_read(&cset->refcount);
/* * 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 (rcu_dereference_protected(cset->dom_cset, 1) != cset) {
threaded_csets++;
seq_printf(seq, "=>%pK", cset->dom_cset);
} if (!list_empty(&cset->threaded_csets)) { struct css_set *tcset; int idx = 0;
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");
/* * On v2, debug is an implicit controller enabled by "cgroup_debug" boot * parameter.
*/ void __init enable_debug_cgroup(void)
{
debug_cgrp_subsys.dfl_cftypes = debug_files;
debug_cgrp_subsys.implicit_on_dfl = true;
debug_cgrp_subsys.threaded = true;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:
(vorverarbeitet am 2026-06-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.