Re: [PATCH v2 3/3] mm: memcontrol: recursive memory.low protection
From: Michal Hocko <hidden>
Date: 2020-02-17 08:41:05
Also in:
linux-mm, lkml
On Fri 14-02-20 11:53:11, Johannes Weiner wrote: [...]
The proper solution to implement the kind of resource hierarchy you
want to express in cgroup2 is to reflect it in the cgroup tree. Yes,
the_workload might have been started by user 100 in session c2, but in
terms of resources, it's prioritized over system.slice and user.slice,
and so that's the level where it needs to sit:
root
/ | \
system.slice user.slice the_workload
/ | |
cron journal user-100.slice
|
session-c2.scope
|
misc
Then you can configure not just memory.low, but also a proper io
weight and a cpu weight. And the tree correctly reflects where the
workload is in the pecking order of who gets access to resources.I have already mentioned that this would be the only solution when the protection would work, right. But I am also saying that this a trivial example where you simply _can_ move your workload to the 1st level. What about those that need to reflect organization into the hierarchy. Please have a look at http://lkml.kernel.org/r/20200214075916.GM31689-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org Are you saying they are just not supported? Are they supposed to use cgroup v1 for the organization and v2 for the resource control? -- Michal Hocko SUSE Labs