From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kernel test robot <xiaolong.ye@intel.com>,
Ingo Molnar <mingo@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
tipbuild@zytor.com, lkp@01.org
Subject: Re: [lkp-robot] [sched/core] 1c3c5eab17: BUG:using_smp_processor_id()in_preemptible
Date: Wed, 24 May 2017 10:04:20 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1705241003590.2201@nanos> (raw)
In-Reply-To: <20170524065202.v25vyu7pvba5mhpd@hirez.programming.kicks-ass.net>
On Wed, 24 May 2017, Peter Zijlstra wrote:
> Subject: sched/clock: Fix early boot preempt warning
>
> The more strict early boot preemption warnings found that
> __set_sched_clock_stable() was incorrectly assuming we'd still be
> running on a single CPU.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> kernel/sched/clock.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
> index 1a0d389d2f2b..ca0f8fc945c6 100644
> --- a/kernel/sched/clock.c
> +++ b/kernel/sched/clock.c
> @@ -133,12 +133,19 @@ static void __scd_stamp(struct sched_clock_data *scd)
>
> static void __set_sched_clock_stable(void)
> {
> - struct sched_clock_data *scd = this_scd();
> + struct sched_clock_data *scd;
>
> /*
> + * Since we're still unstable and the tick is already running, we have
> + * to disable IRQs in order to get a consistent scd->tick* reading.
> + */
> + local_irq_disable();
> + scd = this_scd();
> + /*
> * Attempt to make the (initial) unstable->stable transition continuous.
> */
> __sched_clock_offset = (scd->tick_gtod + __gtod_offset) - (scd->tick_raw);
> + local_irq_enable();
>
> printk(KERN_INFO "sched_clock: Marking stable (%lld, %lld)->(%lld, %lld)\n",
> scd->tick_gtod, __gtod_offset,
>
next prev parent reply other threads:[~2017-05-24 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 5:25 kernel test robot
2017-05-24 6:52 ` Peter Zijlstra
2017-05-24 8:04 ` Thomas Gleixner [this message]
2017-05-24 10:18 ` [tip:sched/core] sched/clock: Fix early boot preempt assumption in __set_sched_clock_stable() tip-bot for 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=alpine.DEB.2.20.1705241003590.2201@nanos \
--to=tglx@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tipbuild@zytor.com \
--cc=torvalds@linux-foundation.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®