Re: sched/fair: Long delays starting RT processes on idle cpu.
From: Steven Rostedt
Date: Mon Jan 27 2020 - 12:15:46 EST
On Mon, 27 Jan 2020 16:56:12 +0000
David Laight <David.Laight@xxxxxxxxxx> wrote:
> >From Steven Rostedt
> > Sent: 27 January 2020 15:50
> > On Mon, 27 Jan 2020 15:39:24 +0000
> > David Laight <David.Laight@xxxxxxxxxx> 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?
I believe you can dynamically change C state. There's a pdf about it:
https://wiki.ntb.ch/infoportal/_media/embedded_systems/ethercat/controlling_processor_c-state_usage_in_linux_v1.1_nov2013.pdf
-- Steve