linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sched/fair: scheduler not running high priority process on idle cpu
@ 2020-01-14 16:50 David Laight
  2020-01-14 16:59 ` Steven Rostedt
  0 siblings, 1 reply; 16+ messages in thread
From: David Laight @ 2020-01-14 16:50 UTC (permalink / raw)
  To: 'Vincent Guittot', Peter Zijlstra
  Cc: Viresh Kumar, Ingo Molnar, Juri Lelli, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, linux-kernel

I've a test that uses four RT priority processes to process audio data every 10ms.
One process wakes up the other three, they all 'beaver away' clearing a queue of
jobs and the last one to finish sleeps until the next tick.
Usually this takes about 0.5ms, but sometimes takes over 3ms.

AFAICT the processes are normally woken on the same cpu they last ran on.
There seems to be a problem when the selected cpu is running a (low priority)
process that is looping in kernel [1].
I'd expect my process to be picked up by one of the idle cpus, but this
doesn't happen.
Instead the process sits in state 'waiting' until the active processes sleeps
(or calls cond_resched()).

Is this really the expected behaviour?????

This is  5.4.0-rc7 kernel.
I could try the current 5.5-rc one if any recent changes might affect things.

Additionally (probably because cv_wait() is implemented with 'ticket locks')
none of the other processes waiting for the cv are woken either.

[1] Xorg seems to periodically request the kernel workqueue run
drm_cflush_sg() to flush the display buffer cache.
For a 2560x1140 display this is 3600 4k pages and the flush loop
takes ~3.3ms.
However there are probably other places where a process can run in
kernel for significant lengths of time.

	David

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-01-20 10:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 16:50 sched/fair: scheduler not running high priority process on idle cpu David Laight
2020-01-14 16:59 ` Steven Rostedt
2020-01-14 17:33   ` David Laight
2020-01-14 17:48     ` Steven Rostedt
2020-01-15 12:44       ` David Laight
2020-01-15 13:18         ` Steven Rostedt
2020-01-15 14:43           ` David Laight
2020-01-15 15:11           ` David Laight
2020-01-15 15:30             ` Steven Rostedt
2020-01-15 17:07               ` David Laight
2020-01-20  9:39                 ` Dietmar Eggemann
2020-01-20 10:51                   ` David Laight
2020-01-15 14:56         ` Peter Zijlstra
2020-01-15 15:09           ` David Laight
2020-01-15 12:57       ` David Laight
2020-01-15 14:23         ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).