From: Thomas Gleixner <tglx@linutronix.de>
To: hpa@zytor.com, cchalpha@gmail.com, xiaolong.ye@intel.com,
peterz@infradead.org, linux-kernel@vger.kernel.org,
kernel@kolivas.org, mingo@kernel.org
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:sched/urgent] Revert "sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()"
Date: Tue, 4 Oct 2016 10:22:15 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1610041021540.5065@nanos> (raw)
In-Reply-To: <tip-be6a2e4c46cc122ba9113ba569fbc50fad075fff@git.kernel.org>
On Tue, 4 Oct 2016, tip-bot for Ingo Molnar wrote:
> The original change widens a preempt-off section, to avoid a seemingly unsafe
> smp_processor_id() use.
>
> During review I overlooked two facts:
>
> - The code to calls a non-trivial function callback:
>
> ht->park(td->cpu);
>
> ... which might (and does occasionally) sleep, triggering the warning.
>
> - More importantly, as pointed out by Peter Zijlstra, using
> smp_processor_id() in that context is safe, if it's done from
> a kernel thread that is pinned to a single CPU - which is the
> case here.
>
> So revert to the original code that enables preemption sooner.
>
> Reported-by: kernel test robot <xiaolong.ye@intel.com>
> Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
prev parent reply other threads:[~2016-10-04 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 1:51 [lkp] [sched/core] 4fa5cd5245: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97 kernel test robot
2016-09-30 10:35 ` Peter Zijlstra
2016-10-04 8:06 ` [tip:sched/urgent] Revert "sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()" tip-bot for Ingo Molnar
2016-10-04 8:22 ` Thomas Gleixner [this message]
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=alpine.DEB.2.20.1610041021540.5065@nanos \
--to=tglx@linutronix.de \
--cc=cchalpha@gmail.com \
--cc=hpa@zytor.com \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=xiaolong.ye@intel.com \
/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®