From: Paul Burton <paul.burton@mips.com>
To: <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Paul Burton <paul.burton@mips.com>
Subject: [PATCH 0/2] sched: Fix a race between CPU onlining & user task scheduling
Date: Sat, 26 May 2018 08:46:46 -0700 [thread overview]
Message-ID: <20180526154648.11635-1-paul.burton@mips.com> (raw)
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
next reply other threads:[~2018-05-26 15:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 15:46 Paul Burton [this message]
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
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=20180526154648.11635-1-paul.burton@mips.com \
--to=paul.burton@mips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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®