From: Peter Zijlstra <peterz@infradead.org>
To: Josh Don <joshdon@google.com>
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>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Joel Fernandes <joel@joelfernandes.org>,
Vineeth Pillai <vineethrp@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Tao Zhou <tao.zhou@linux.dev>
Subject: Re: [PATCH] sched/core: fix pick_next_task 'max' tracking
Date: Tue, 24 Aug 2021 10:55:23 +0200 [thread overview]
Message-ID: <YSSz+wSVrf6jAw8Q@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CABk29Ns-aiSjf8WTWL5U0ggKr32NKC3Q6ANJ8MheDP5P-k_JuA@mail.gmail.com>
On Mon, Aug 23, 2021 at 04:24:26PM -0700, Josh Don wrote:
> Hi Peter,
>
> On Mon, Aug 23, 2021 at 4:17 AM Peter Zijlstra <peterz@infradead.org> wrote:
> [snip]
> > + for_each_cpu(i, smt_mask) {
> > + rq_i = cpu_rq(i);
> > + p = rq_i->core_temp;
> >
> > - /*
> > - * If this sibling doesn't yet have a suitable task to
> > - * run; ask for the most eligible task, given the
> > - * highest priority task already selected for this
> > - * core.
> > - */
> > - p = pick_task(rq_i, class, max, fi_before);
> > + if (!cookie_equals(p, cookie)) {
> > + p = NULL;
> > + if (cookie)
> > + p = sched_core_find(rq_i, cookie);
>
> In the case that 'max' has a zero cookie, shouldn't we search for a
> match on this cpu if the original class pick ('p') had a non-zero
> cookie? We don't enqueue tasks with zero cookie in the core_tree, so I
> forget if there was some other reasoning here.
IIRC we don't keep 0-cookies in the tree. Lemme check.
Yeah, see sched_core_enqueue(), they bail for 0-cookie.
This is indeed sub-optimal, but also having the 0-cookie tasks in the
tree has other issues IIRC.
prev parent reply other threads:[~2021-08-24 8:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 0:56 [PATCH] sched/core: fix pick_next_task 'max' tracking Josh Don
2021-08-18 4:35 ` Tao Zhou
2021-08-18 15:18 ` Tao Zhou
2021-08-23 11:16 ` Peter Zijlstra
2021-08-23 15:38 ` Tao Zhou
2021-08-23 20:25 ` Vineeth Pillai
2021-08-23 22:57 ` Tao Zhou
2021-08-24 9:03 ` Peter Zijlstra
2021-08-24 9:38 ` [PATCH] sched/core: Simplify core-wide task selection Peter Zijlstra
2021-08-24 12:15 ` Tao Zhou
2021-08-24 17:40 ` Josh Don
2021-08-24 18:28 ` Vineeth Pillai
2021-09-09 11:18 ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2021-10-05 14:12 ` tip-bot2 for Peter Zijlstra
2021-08-23 23:24 ` [PATCH] sched/core: fix pick_next_task 'max' tracking Josh Don
2021-08-24 3:01 ` Tao Zhou
2021-08-24 8:55 ` Peter Zijlstra [this message]
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=YSSz+wSVrf6jAw8Q@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joel@joelfernandes.org \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tao.zhou@linux.dev \
--cc=vincent.guittot@linaro.org \
--cc=vineethrp@gmail.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