All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sched: Fix a race between CPU onlining & user task scheduling
@ 2018-05-26 15:46 Paul Burton
  2018-05-26 15:46 ` [PATCH 1/2] sched: Make select_task_rq() require cpu_active() for user tasks Paul Burton
  2018-05-26 15:46 ` [PATCH 2/2] sched: Warn if we fail to migrate a task Paul Burton
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Burton @ 2018-05-26 15:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Peter Zijlstra, Thomas Gleixner, Ingo Molnar, Paul Burton

This short series fixes a race condition I've observed in which user
tasks can be scheduled on CPUs that are still in the process of being
brought online (or rather being made active) by hotplug.

I've created a small test case for the observed problem here:

  https://gist.github.com/paulburton/25187c4f537263a6be9c8aac67bd33bf

The issue was first observed on a MIPS system running a test program
that was sensitive to CPU affinity, but has been reproduced on x86_64
using the above program too. On my laptop with an Intel i7-5600U CPU the
test tends to fail within 10 minutes, but with this series applied runs
cleanly overnight.

Thanks,
    Paul

Paul Burton (2):
  sched: Make select_task_rq() require cpu_active() for user tasks
  sched: Warn if we fail to migrate a task

 kernel/sched/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.17.0

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

end of thread, other threads:[~2018-05-31 12:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-26 15:46 [PATCH 0/2] sched: Fix a race between CPU onlining & user task scheduling Paul Burton
2018-05-26 15:46 ` [PATCH 1/2] sched: Make select_task_rq() require cpu_active() for user tasks Paul Burton
2018-05-28 14:49   ` Peter Zijlstra
2018-05-28 15:45     ` Paul Burton
2018-05-28 15:53       ` Peter Zijlstra
2018-05-28 16:10         ` Paul Burton
2018-05-31 12:28   ` [tip:sched/urgent] sched/core: Require cpu_active() in select_task_rq(), " tip-bot for Paul Burton
2018-05-26 15:46 ` [PATCH 2/2] sched: Warn if we fail to migrate a task Paul Burton
2018-05-28 15:06   ` Peter Zijlstra
2018-05-28 15:59     ` Paul Burton
2018-05-29 10:40       ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.