[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1BqT59ovFitahJa@slm.duckdns.org>
Date: Wed, 19 Oct 2022 11:21:19 -1000
From: Tejun Heo <tj@...nel.org>
To: Chuyi Zhou <zhouchuyi@...edance.com>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, linux-kernel@...r.kernel.org,
htejun@...il.com, lizefan.x@...edance.com, vschneid@...hat.com,
bsegall@...gle.com, Abel Wu <wuyun.abel@...edance.com>
Subject: Re: [RESEND] sched/fair: Add min_ratio for cfs bandwidth_control
Hello,
On Wed, Oct 19, 2022 at 11:15:51AM +0800, Chuyi Zhou wrote:
> Tasks may be throttled when holding locks for a long time by current
> cfs bandwidth control mechanism once users set a too small quota/period
> ratio, which can result whole system get stuck[1].
>
> In order to prevent the above situation from happening, this patch adds
> sysctl_sched_cfs_bandwidth_min_ratio in /proc/sys/kernel, which indicates
> the minimum percentage of quota/period users can set. The default value is
> zero and users can set quota and period without triggering this constraint.
>
> Link[1]:https://lore.kernel.org/lkml/5987be34-b527-4ff5-a17d-5f6f0dc94d6d@huawei.com/T/
> Signed-off-by: Chuyi Zhou <zhouchuyi@...edance.com>
> Suggested-by: Abel Wu <wuyun.abel@...edance.com>
This is a bit of a bandaid. I think what we really need to do is only
throttling when running in userspace. In kernel space, it should just keep
accumulating used cycles as debt which should be paid back before userspace
code can run again so that we don't throttle at random places in the kernel.
Thanks.
--
tejun
Powered by blists - more mailing lists