mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuyi Zhou <zhouchuyi@bytedance.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, htejun@gmail.com
Subject: Re: [RESEND] sched/fair: Add min_ratio for cfs bandwidth_control
Date: Thu, 20 Oct 2022 14:35:24 +0800	[thread overview]
Message-ID: <3f6935de-d80f-0aa0-efd8-94a1076ce8d3@bytedance.com> (raw)
In-Reply-To: <Y1BqT59ovFitahJa@slm.duckdns.org>



在 2022/10/20 05:21, Tejun Heo 写道:
> 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@bytedance.com>
>> Suggested-by: Abel Wu <wuyun.abel@bytedance.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.
> 
Got it. Thanks for your advice.
Chuyi Zhou

  reply	other threads:[~2022-10-20  6:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19  3:15 Chuyi Zhou
2022-10-19 21:01 ` Benjamin Segall
2022-10-20  9:14   ` [External] " Chuyi Zhou
2022-10-19 21:21 ` Tejun Heo
2022-10-20  6:35   ` Chuyi Zhou [this message]
2022-10-20 17:08   ` Peter Zijlstra
2022-10-21 18:04     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3f6935de-d80f-0aa0-efd8-94a1076ce8d3@bytedance.com \
    --to=zhouchuyi@bytedance.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®