From: Steven Rostedt <rostedt@goodmis.org>
To: Lichao Liu <liulichao@loongson.cn>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
bsegall@google.com, mgorman@suse.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/rt: Don't active rt throtting when no running cfs task
Date: Tue, 16 Jun 2020 09:50:27 -0400 [thread overview]
Message-ID: <20200616095027.1a2048d0@oasis.local.home> (raw)
In-Reply-To: <20200616123729.153430-1-liulichao@loongson.cn>
On Tue, 16 Jun 2020 20:37:29 +0800
Lichao Liu <liulichao@loongson.cn> wrote:
> Active rt throtting will dequeue rt_rq from rq at least 50ms,
> When there is no running cfs task, do we still active it?
>
This is something I would like to have.
Peter, what's your thought on this?
-- Steve
> Signed-off-by: Lichao Liu <liulichao@loongson.cn>
> ---
> kernel/sched/rt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index df11d88c9895..d6524347cea0 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -961,12 +961,13 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
>
> if (rt_rq->rt_time > runtime) {
> struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq);
> + struct rq *rq = rq_of_rt_rq(rt_rq);
>
> /*
> * Don't actually throttle groups that have no runtime assigned
> * but accrue some time due to boosting.
> */
> - if (likely(rt_b->rt_runtime)) {
> + if (likely(rt_b->rt_runtime) && rq->cfs.nr_running > 0) {
> rt_rq->rt_throttled = 1;
> printk_deferred_once("sched: RT throttling activated\n");
> } else {
next prev parent reply other threads:[~2020-06-16 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 12:37 [PATCH] sched/rt: Don't active rt throtting when no running cfs task Lichao Liu
2020-06-16 13:50 ` Steven Rostedt [this message]
2020-06-16 14:01 ` Peter Zijlstra
2020-06-16 14:59 ` Steven Rostedt
2020-06-16 17:07 ` Peter Zijlstra
2020-06-16 18:33 ` Steven Rostedt
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=20200616095027.1a2048d0@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liulichao@loongson.cn \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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