From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Saravana Kannan <saravanak@google.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Benjamin Segall <bsegall@google.com>,
Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
LKML <linux-kernel@vger.kernel.org>, <wuyun.abel@bytedance.com>,
<youssefesmat@chromium.org>, Thomas Gleixner <tglx@linutronix.de>,
<efault@gmx.de>, John Stultz <jstultz@google.com>,
Vincent Palomares <paillon@google.com>,
Tobias Huschle <huschle@linux.ibm.com>
Subject: Re: Very high scheduling delay with plenty of idle CPUs
Date: Mon, 11 Nov 2024 10:47:21 +0530 [thread overview]
Message-ID: <cc8831c7-8ea2-0ee7-061f-73352d7832ad@amd.com> (raw)
In-Reply-To: <CAGETcx-CvWVc=TP5OmUL_iF7fSb1awJB1G8NghM1q_6dYKXkQQ@mail.gmail.com>
(+ Tobias)
Hello Saravana,
On 11/10/2024 11:19 AM, Saravana Kannan wrote:
> On Fri, Nov 8, 2024 at 12:31 AM Peter Zijlstra <peterz@infradead.org> wrote:
>>
>> On Thu, Nov 07, 2024 at 11:28:07PM -0800, Saravana Kannan wrote:
>>> Hi scheduler folks,
>>>
>>> I'm running into some weird scheduling issues when testing non-sched
>>> changes on a Pixel 6 that's running close to 6.12-rc5. I'm not sure if
>>> this is an issue in earlier kernel versions or not.
>>>
>>
>> It's a bit unfortunate you don't have a known good kernel there. Anyway,
>> one thing that recently came up is that DELAY_DEQUEUE can cause some
>> delays, specifically it can inhibit wakeup migration.
>
> I disabled DELAY_DEQUEUE and I'm still seeing preemptions or
> scheduling latency (after wakeup)
On the scheduling latency front, have you tried running with
RUN_TO_PARITY and/or PLACE_LAG disabled. If the tick granularity on your
system is less that the "base_slice_ns", disabling RUN_TO_PARITY can
help switch to a newly woken up task slightly faster. Disabling
PLACE_LAG makes sure the newly woken task is always eligible for
selection. However, both come with the added disadvantage of a sharp
increase in the number of involuntary context switches for some of the
scenarios we have tested. There is a separate thread from Cristian
making a case to toggle these features via sysfs and keep them disabled
by default [0]
[0] https://lore.kernel.org/lkml/20241017052000.99200-1-cpru@amazon.com/
> when there are plenty of CPUs even
> within the same cluster/frequency domain.
I'm not aware of any recent EAS specific changes that could have led to
larger scheduling latencies in the recent times but Tobias had reported
a similar increase in kworker scheduling latency when EEVDF was first
introduced in a different context [1]. I'm not sure if he is still
observing the same behavior on the current upstream but would it be
possible to check if you can see the large scheduling latency only
starting with v6.6 (when EEVDF was introduced) and not on v6.5
(ran with older CFS logic). I'm also assuming the system / benchmark
does change the default scheduler related debug tunables, some of which
went away in v6.6
[1] https://lore.kernel.org/lkml/c7b38bc27cc2c480f0c5383366416455@linux.ibm.com/
>
> Can we tell the scheduler to just spread out all the tasks during
> suspend/resume? Doesn't make a lot of sense to try and save power
> during a suspend/resume. It's almost always cheaper/better to do those
> quickly.
That would increase the resume latency right since each runnable task
needs to go through a full idle CPU selection cycle? Isn't time a
consideration / concern in the resume path? Unless we go through the
slow path, it is very likely we'll end up making the same task
placement decisions again?
>
> -Saravana
>
>
> -Saravana
>
>>
>> You can either test with that feature turned off, or apply something
>> like the following patch:
>>
>> https://lkml.kernel.org/r/20241106135346.GL24862@noisy.programming.kicks-ass.net
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2024-11-11 5:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 7:28 Saravana Kannan
2024-11-08 8:31 ` Peter Zijlstra
2024-11-10 5:49 ` Saravana Kannan
2024-11-11 5:17 ` K Prateek Nayak [this message]
2024-11-11 6:15 ` Saravana Kannan
2024-11-11 8:25 ` Christian Loehle
2024-11-11 9:02 ` Saravana Kannan
2024-11-11 9:08 ` Christian Loehle
2024-11-11 10:40 ` Peter Zijlstra
2024-11-11 11:15 ` Vincent Guittot
2024-11-11 18:17 ` Saravana Kannan
2024-11-11 19:00 ` Vincent Guittot
2024-11-11 18:23 ` Saravana Kannan
2024-11-11 19:01 ` Vincent Guittot
2024-11-11 19:12 ` Vincent Guittot
2024-11-12 7:23 ` Saravana Kannan
2024-11-12 9:03 ` Vincent Guittot
2024-11-12 16:25 ` Saravana Kannan
2024-11-12 17:00 ` Vincent Guittot
2024-11-08 9:02 ` Vincent Guittot
2024-11-14 6:36 ` Saravana Kannan
2024-11-14 13:06 ` Vincent Guittot
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=cc8831c7-8ea2-0ee7-061f-73352d7832ad@amd.com \
--to=kprateek.nayak@amd.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=efault@gmx.de \
--cc=huschle@linux.ibm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=paillon@google.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=saravanak@google.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=wuyun.abel@bytedance.com \
--cc=youssefesmat@chromium.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®