From: Carsten Emde <C.Emde@osadl.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
Linux RT Users <linux-rt-users@vger.kernel.org>
Subject: Re: 3.18.7-rt2: NOHZ_FULL warning at boot
Date: Fri, 06 Mar 2015 20:28:52 +0100 [thread overview]
Message-ID: <54F9FFF4.9080303@osadl.org> (raw)
In-Reply-To: <20150306181345.GD10155@linutronix.de>
On 03/06/2015 07:13 PM, Sebastian Andrzej Siewior wrote:
> * Luis Claudio R. Goncalves | 2015-02-26 17:05:47 [-0300]:
>
>> I have been seeing the warning below at boot time on 3.18.7-rt2. Anybody
>> else seeing it?
>
> This should fix it.
>
> diff --git a/kernel/irq_work.c b/kernel/irq_work.c
> index 19c363a..0c64912 100644
> --- a/kernel/irq_work.c
> +++ b/kernel/irq_work.c
> @@ -71,6 +71,8 @@ void __weak arch_irq_work_raise(void)
> */
> bool irq_work_queue_on(struct irq_work *work, int cpu)
> {
> + bool raise_irqwork;
> +
> /* All work should have been flushed before going offline */
> WARN_ON_ONCE(cpu_is_offline(cpu));
>
> @@ -81,7 +83,19 @@ bool irq_work_queue_on(struct irq_work *work, int cpu)
> if (!irq_work_claim(work))
> return false;
>
> - if (llist_add(&work->llnode, &per_cpu(raised_list, cpu)))
> +#ifdef CONFIG_PREEMPT_RT_FULL
> + if (work->flags & IRQ_WORK_HARD_IRQ)
> + raise_irqwork = llist_add(&work->llnode,
> + &per_cpu(hirq_work_list, cpu));
> + else
> + raise_irqwork = llist_add(&work->llnode,
> + &per_cpu(lazy_list, cpu));
> +#else
> + raise_irqwork = llist_add(&work->llnode,
> + &per_cpu(raised_list, cpu));
> +#endif
> +
> + if (raise_irqwork)
> arch_send_call_function_single_ipi(cpu);
>
> return true;
> @@ -101,19 +115,14 @@ bool irq_work_queue(struct irq_work *work)
>
> #ifdef CONFIG_PREEMPT_RT_FULL
> if (work->flags & IRQ_WORK_HARD_IRQ) {
> - if (llist_add(&work->llnode, this_cpu_ptr(&hirq_work_list))) {
> - if (work->flags & IRQ_WORK_LAZY) {
> - if (tick_nohz_tick_stopped())
> - arch_irq_work_raise();
> - } else {
> - arch_irq_work_raise();
> - }
> - }
> - /* If the work is "lazy", handle it from next tick if any */
> - } else if (work->flags & IRQ_WORK_LAZY) {
> + if (llist_add(&work->llnode, this_cpu_ptr(&hirq_work_list)))
> + arch_irq_work_raise();
> + } else {
> + if (llist_add(&work->llnode, this_cpu_ptr(&lazy_list)))
> + arch_irq_work_raise();
> + }
> #else
> if (work->flags & IRQ_WORK_LAZY) {
> -#endif
> if (llist_add(&work->llnode, this_cpu_ptr(&lazy_list)) &&
> tick_nohz_tick_stopped())
> arch_irq_work_raise();
> @@ -121,6 +130,7 @@ bool irq_work_queue(struct irq_work *work)
> if (llist_add(&work->llnode, this_cpu_ptr(&raised_list)))
> arch_irq_work_raise();
> }
> +#endif
>
> preempt_enable();
>
> @@ -137,7 +147,8 @@ bool irq_work_needs_cpu(void)
>
> if (llist_empty(raised))
> if (llist_empty(lazy))
> - return false;
> + if (llist_empty(this_cpu_ptr(&hirq_work_list)))
> + return false;
>
> /* All work should have been flushed before going offline */
> WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
I can confirm that the warning is no longer issued when this patch is
applied.
Thanks,
-Carsten.
prev parent reply other threads:[~2015-03-06 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 20:05 3.18.7-rt2: NOHZ_FULL warning at boot Luis Claudio R. Goncalves
2015-02-26 20:11 ` Sebastian Andrzej Siewior
2015-03-06 18:13 ` Sebastian Andrzej Siewior
2015-03-06 19:28 ` Carsten Emde [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=54F9FFF4.9080303@osadl.org \
--to=c.emde@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=lclaudio@uudg.org \
--cc=linux-rt-users@vger.kernel.org \
/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