From: Phil Auld <pauld@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <jstultz@google.com>,
LKML <linux-kernel@vger.kernel.org>,
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>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
kernel-team@android.com, peter-yc.chang@mediatek.com
Subject: Re: [PATCH v3] sched/core: Tweak wait_task_inactive() to force dequeue sched_delayed tasks
Date: Wed, 30 Apr 2025 09:45:22 -0400 [thread overview]
Message-ID: <20250430134522.GA133753@pauld.westford.csb> (raw)
In-Reply-To: <20250430124425.GN4439@noisy.programming.kicks-ass.net>
On Wed, Apr 30, 2025 at 02:44:25PM +0200 Peter Zijlstra wrote:
> On Tue, Apr 29, 2025 at 11:36:05AM -0400, Phil Auld wrote:
> > Hi John,
> >
> > On Tue, Apr 29, 2025 at 08:07:26AM -0700 John Stultz wrote:
> > > It was reported that in 6.12, smpboot_create_threads() was
> > > taking much longer then in 6.6.
> > >
> > > I narrowed down the call path to:
> > > smpboot_create_threads()
> > > -> kthread_create_on_cpu()
> > > -> kthread_bind()
> > > -> __kthread_bind_mask()
> > > ->wait_task_inactive()
> > >
> > > Where in wait_task_inactive() we were regularly hitting the
> > > queued case, which sets a 1 tick timeout, which when called
> > > multiple times in a row, accumulates quickly into a long
> > > delay.
> > >
> > > I noticed disabling the DELAY_DEQUEUE sched feature recovered
> > > the performance, and it seems the newly create tasks are usually
> > > sched_delayed and left on the runqueue.
> >
> > This seems odd to me. Maybe I'm just misunderstanding something but
> > I don't see how newly created tasks should have accumulated enough
> > runtime to have negative lag that needs to be decayed.
> >
> > That said, I think it does make sense to dequeue in this case.
>
> Well, they start at 0, any runtime will likely push them negative.
>
I thought they "made a request" and got a slice when entering the
competition so would not immediately go negative when executing.
It's now been a while since I read the paper though...
Starting at 0 (service that it ought to have is none) and going
immediately negative seems to imply never having positive lag. But,
like I said, probably just misunderstanding something :)
Cheers,
Phil
--
next prev parent reply other threads:[~2025-04-30 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 15:07 John Stultz
2025-04-29 15:36 ` Phil Auld
2025-04-30 12:44 ` Peter Zijlstra
2025-04-30 13:45 ` Phil Auld [this message]
2025-04-30 12:43 ` Peter Zijlstra
2025-04-30 22:04 ` John Stultz
2025-05-08 10:43 ` [tip: sched/core] " tip-bot2 for John Stultz
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=20250430134522.GA133753@pauld.westford.csb \
--to=pauld@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@android.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peter-yc.chang@mediatek.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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
all inboxes | Powered by JetHome®