public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@purestorage.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>
Subject: Re: sched: wakeup setting TIF_NEED_RESCHED too frequently
Date: Wed, 28 Apr 2021 11:51:24 -0700	[thread overview]
Message-ID: <YImurOENWBEg8UP+@cork> (raw)
In-Reply-To: <YIkdDeb9c+XmDRvM@hirez.programming.kicks-ass.net>

On Wed, Apr 28, 2021 at 10:30:05AM +0200, Peter Zijlstra wrote:
> 
> set_nr_if_polling() only sets TIF_NEED_RESCHED IFF TIF_POLLING_NRFLAG is
> set. TIF_POLLING_NRFLAG is only set when idle and is then sufficient to
> wake that cpu and reschedule.
> 
> If not TIF_POLLING_NRFLAG, then we send an IPI to deal with the
> non-empty wake_list.

Yeah, saw that myself.  My explanation of the behaviour is wrong.  The
observed behaviour remains, though.

Guess I have to add more instrumentation if I cannot find the cause by
reading the code.

Thank you!

Jörn

--
Optimizations always bust things, because all optimizations are, in
the long haul, a form of cheating, and cheaters eventually get caught.
-- Larry Wall

      reply	other threads:[~2021-04-28 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 21:16 sched: wakeup setting TIF_NEED_RESCHED too frequently Jörn Engel
2021-04-28  8:30 ` Peter Zijlstra
2021-04-28 18:51   ` Jörn Engel [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=YImurOENWBEg8UP+@cork \
    --to=joern@purestorage.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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