From: Steven Rostedt <rostedt@goodmis.org>
To: Scott Wood <swood@redhat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH RT 1/2] sched: migrate_enable: Use per-cpu cpu_stop_work
Date: Fri, 24 Jan 2020 10:38:22 -0500 [thread overview]
Message-ID: <20200124103822.76ab320f@gandalf.local.home> (raw)
In-Reply-To: <1579864307-13093-1-git-send-email-swood@redhat.com>
On Fri, 24 Jan 2020 06:11:46 -0500
Scott Wood <swood@redhat.com> wrote:
> Commit e6c287b1512d ("sched: migrate_enable: Use stop_one_cpu_nowait()")
> adds a busy wait to deal with an edge case where the migrated thread
> can resume running on another CPU before the stopper has consumed
> cpu_stop_work. However, this is done with preemption disabled and can
> potentially lead to deadlock.
>
> While it is not guaranteed that the cpu_stop_work will be consumed before
> the migrating thread resumes and exits the stack frame, it is guaranteed
> that nothing other than the stopper can run on the old cpu between the
> migrating thread scheduling out and the cpu_stop_work being consumed.
> Thus, we can store cpu_stop_work in per-cpu data without it being
> reused too early.
>
Makes sense to me.
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
next prev parent reply other threads:[~2020-01-24 15:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 11:11 Scott Wood
2020-01-24 11:11 ` [PATCH RT 2/2] sched: migrate_enable: Remove __schedule() call Scott Wood
2020-01-24 15:38 ` Steven Rostedt [this message]
2020-02-03 17:37 ` [PATCH RT 1/2] sched: migrate_enable: Use per-cpu cpu_stop_work Sebastian Andrzej Siewior
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=20200124103822.76ab320f@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=swood@redhat.com \
--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®