mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Steven Rostedt' <rostedt@goodmis.org>
Cc: 'linux-kernel' <linux-kernel@vger.kernel.org>
Subject: RE: sched/fair: Long delays starting RT processes on idle cpu.
Date: Mon, 27 Jan 2020 16:56:12 +0000	[thread overview]
Message-ID: <a23fe4c769364ab49865e4c46aa73830@AcuMS.aculab.com> (raw)
In-Reply-To: <20200127104948.59eac75a@gandalf.local.home>

From Steven Rostedt
> Sent: 27 January 2020 15:50
> On Mon, 27 Jan 2020 15:39:24 +0000
> David Laight <David.Laight@ACULAB.COM> wrote:
> 
> > I'd have thought that the processor should wake up much faster than that.
> > I can't see the memory write that is paired with the monitor/mwait.
> > Does it need a strong barrier?
> 
> You may want to prevent the CPU from going into a deep C state. 90us is
> something I would expect if the CPU is in a deep C state (I've seen
> much longer wake up times due to deep C state).
> 
> Boot the kernel with idle=poll and see if you can trigger the same
> latency. If not, then you know it's the CPU going into a deep C state
> that is causing your latency.

With idle=poll the delays seem to be minimal.

Is there any way to limit the C state entered by mwait?
Or to try the check that monitor/mwait is being triggered properly.
Is there a clfulsh() in the writing side?
If not, might one help??

I see almost repeatable delays eg for 6 processes being scheduled (more or less in sequence).
10us waking cpu 2.
60us waking cpu 1.
40us waking cpu 0 and 40us waking cpu3.
20us waking cpu 2.
20us waking cpu 0.
None of the processes runs for anything like the delays.
The whole thing repeats every 10ms.
Note that the first process is actually signalling a CV that 4 of the other 5
are waiting on.
So there are cumulative delays of around 140us before the 4th is woken.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2020-01-27 16:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 15:39 David Laight
2020-01-27 15:49 ` Steven Rostedt
2020-01-27 16:56   ` David Laight [this message]
2020-01-27 17:15     ` Steven Rostedt
2020-01-28 11:45       ` David Laight

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=a23fe4c769364ab49865e4c46aa73830@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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®