lkml.org 
[lkml]   [2022]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] blk-throttle: enable io throttle for root in cgroup v2
On Fri, Jan 14, 2022 at 05:30:00PM +0800, Yu Kuai wrote:
> RFC patch: https://lkml.org/lkml/2021/9/9/1432
>
> There is a proformance problem in our environment:
>
> A host can provide a remote device to difierent client. If one client is
> under high io pressure, other clients might be affected.
>
> Limit the overall iops/bps(io.max) from the client can fix the problem,
> however, config files do not exist in root cgroup currently, which makes
> it impossible.
>
> This patch enables io throttle for root cgroup:
> - enable "io.max" and "io.low" in root
> - don't skip root group in tg_iops_limit() and tg_bps_limit()
> - don't skip root group in tg_conf_updated()
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>

Yeah, I'm kinda split. It's a simple change with some utility, but it's also
something which doesn't fit with the cgroup feature or interface. It's
regulating the whole system behavior. There's no reason for any of the
control "groups" to be involved here and semantically the interface would
fit a lot better under /proc, /sys or some other system-wide location. Here
are some points to consider:

* As a comparison, it'd be rather absurd to enable memory.max at system root
in terms of interface and most likely break whole lot of mm operations.

* Resource control knobs of a cgroup belong to the parent as the parent is
responsible for divvying up the available resources to its children. Here
too, the knobs are making sense because there's a higher level parent
(whether that's hypervisor or some network server).

Is your use case VMs or network attached storage?

Thanks.

--
tejun

\
 
 \ /
  Last update: 2022-01-26 18:31    [W:0.097 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site