lkml.org 
[lkml]   [2018]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] sched: Fix a race between CPU onlining & user task scheduling
Date
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

\
 
 \ /
  Last update: 2018-05-26 17:48    [W:0.082 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site