From: Hao Jia <jiahao.os@bytedance.com>
To: Josh Don <joshdon@google.com>, Chuyi Zhou <zhouchuyi@bytedance.com>
Cc: peterz@infradead.org, juri.lelli@redhat.com, mingo@redhat.com,
vincent.guittot@linaro.org, linux-kernel@vger.kernel.org,
Abel Wu <wuyun.abel@bytedance.com>
Subject: Re: [External] Re: [PATCH] sched/fair: favor non-idle group in tick preemption
Date: Fri, 4 Nov 2022 11:49:16 +0800 [thread overview]
Message-ID: <eae73b1a-cd28-e87a-e487-bd0d95b5655e@bytedance.com> (raw)
In-Reply-To: <CABk29Nsnx=PfeLMEsD0qsnh5-QTHLT4xVB3HmBgGAqqmWnkmvg@mail.gmail.com>
On 2022/11/2 Josh Don wrote:
>>> Some weirdness about this change though, is that if there is a
>>> non-idle current entity, and the two next entities on the cfs_rq are
>>> idle and non-idle respectively, we'll now take longer to preempt the
>>> on-cpu non-idle entity, because the non-idle entity on the cfs_rq is
>>> 'hidden' by the idle 'first' entity. Wakeup preemption is different
>>> because we're always directly comparing the current entity with the
>>> newly woken entity.
>>>
>> You are right, this can happen with high probability.
>> This patch just compared the curr with the first entity in
>> the tick, and it seems hard to consider all the other entity
>> in cfs_rq.
>>
>> So, what specific negative effects this situation would cause?
>> For example, the "hidden" non-idle entity's latency will be worse
>> than before?
>
> As Abel points out in his email, it can push out the time it'll take
> to switch to the other non-idle entity. The change might boost some
> benchmarks numbers, but I don't think it is conclusive enough to say
> it is a generically beneficial improvement that should be integrated.
>
> By the way, I'm curious if you modified any of the sched_idle_cpu()
> and related load balancing around idle entities given that you've made
> it so that idle entities can have arbitrary weight (since, as I
> described in my prior email, this can otherwise cause issues there).
If we want to make it easier for non-idle tasks to preempt idle tasks in
tick, maybe we can consider lowering sysctl_sched_idle_min_granularity.
Of course this may not ensure that non-idle tasks successfully preempt
idle tasks every time, but it seems to be more beneficial for non-idle
tasks.
IMHO, even if it is allowed to increase the weight of non-idle, it seems
that we can make it easier for non-idle tasks to preempt idle tasks by
lowering sysctl_sched_idle_min_granularity.
Thanks,
Hao
next prev parent reply other threads:[~2022-11-04 3:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 8:16 [PATCH] sched/fair: favor non-idle group in tick preemption Chuyi Zhou
2022-10-27 23:34 ` Josh Don
2022-10-28 3:57 ` Chuyi Zhou
2022-10-28 22:40 ` Josh Don
2022-10-31 8:39 ` Chuyi Zhou
2022-10-31 22:44 ` Josh Don
2022-11-01 3:45 ` Chuyi Zhou
2022-11-01 23:39 ` Josh Don
2022-11-03 11:24 ` Chuyi Zhou
2022-11-04 3:49 ` Hao Jia [this message]
2022-11-04 21:25 ` [External] " Josh Don
2022-11-11 3:50 ` Abel Wu
2022-11-11 19:14 ` Josh Don
2022-11-01 9:14 ` Abel Wu
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=eae73b1a-cd28-e87a-e487-bd0d95b5655e@bytedance.com \
--to=jiahao.os@bytedance.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.org \
--cc=wuyun.abel@bytedance.com \
--cc=zhouchuyi@bytedance.com \
/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