All of lore.kernel.org
 help / color / mirror / Atom feed
* A "domain invalid" cgroup *can* sometimes have member tasks
@ 2018-02-20 19:26 Michael Kerrisk (man-pages)
  2018-02-20 19:35 ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2018-02-20 19:26 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Serge E. Hallyn, lkml, open list:CONTROL GROUP (CGROUP),
	Michael Kerrisk

Hello Tejun

According to Documentation/cgroup-v2.txt, a "domain invalid" cgroup
can't have member tasks. And indeed this is generally not permitted.

However, someone recently showed me a scenario where a "domain
invalid" cgroup can have member processes. See the following example:

# mkdir -p /sys/fs/cgroup/unified/grp0/grp1
# sleep 1000 &
[1] 10549
# echo 10549 > /sys/fs/cgroup/unified/grp0/grp1/cgroup.procs
# echo threaded > /sys/fs/cgroup/unified/grp0/cgroup.type
# cat /sys/fs/cgroup/unified/grp0/cgroup.type
threaded
# cat /sys/fs/cgroup/unified/grp0/grp1/cgroup.type
domain invalid
# cat /sys/fs/cgroup/unified/grp0/grp1/cgroup.threads
10549

>From the above, we see that the cgroup grp0/grp1 is of type "domain
invalid" and has a member thread. This seems to be a violation of the
documented rules, and is I assume a bug, since in the above scenario,
we are denied from adding further tasks to the grp0/grp1 cgroup:

# sleep 2000 &
[2] 10553
# echo 10553 > /sys/fs/cgroup/unified/grp0/grp1/cgroup.procs
sh: echo: write error: Operation not supported

Could you comment please?

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-21 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 19:26 A "domain invalid" cgroup *can* sometimes have member tasks Michael Kerrisk (man-pages)
2018-02-20 19:35 ` Tejun Heo
2018-02-20 23:01   ` Tejun Heo
2018-02-21  7:45     ` Michael Kerrisk (man-pages)
2018-02-21 19:47       ` [PATCH cgroup/for-4.16-fixes] cgroup: fix rule checking for threaded mode switching Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.