From: Valentin Schneider <valentin.schneider@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Android Kernel Team <kernel-team@android.com>,
Russell King <linux@arm.linux.org.uk>,
Marc Zyngier <maz@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Will Deacon <will@kernel.org>,
LAK <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 2/6] genirq: Allow an interrupt to be marked as 'raw'
Date: Thu, 03 Dec 2020 15:52:44 +0000 [thread overview]
Message-ID: <jhjy2ieubsj.mognet@arm.com> (raw)
In-Reply-To: <20201203130320.GQ3021@hirez.programming.kicks-ass.net>
On 03/12/20 13:03, Peter Zijlstra wrote:
> On Thu, Nov 26, 2020 at 06:18:33PM +0000, Valentin Schneider wrote:
>> If I got the RCU bits right from what Thomas mentioned in
>>
>> https://lore.kernel.org/r/87ft5q18qs.fsf@nanos.tec.linutronix.de
>> https://lore.kernel.org/r/87lfewnmdz.fsf@nanos.tec.linutronix.de
>>
>> then we're still missing something to notify RCU in the case the IRQ hits
>> the idle task. All I see on our entry path is
>>
>> trace_hardirqs_off();
>> ...
>> irq_handler()
>> handle_domain_irq();
>> ...
>> trace_hardirqs_on();
>>
>> so we do currently rely on handle_domain_irq()'s irq_enter() + irq_exit()
>> for that. rcu_irq_enter() says CONFIG_RCU_EQS_DEBUG=y can detect missing
>> bits, but I don't get any warnings with your series on my Juno.
>
> The scheduler IPI really doesn't need RCU either ;-)
Because it doesn't enter any new read-side section, right?
But as with any other interrupt, we could then go through:
preempt_schedule_irq() ~> pick_next_task_fair() -> newidle_balance()
which does enter a read-side section, so RCU would need to be
watching. Looking at kernel/entry/common.c:irqentry_exit_cond_resched(), it
seems we do check for this via rcu_irq_exit_check_preempt().
I however cannot grok why irqentry_exit() *doesn't* call into
preempt_schedule_irq() if RCU wasn't watching on IRQ entry, so I'm starting
to question everything (again).
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Valentin Schneider <valentin.schneider@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Marc Zyngier <maz@kernel.org>,
LAK <linux-arm-kernel@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Mark Rutland <mark.rutland@arm.com>,
Russell King <linux@arm.linux.org.uk>,
Android Kernel Team <kernel-team@android.com>
Subject: Re: [PATCH v2 2/6] genirq: Allow an interrupt to be marked as 'raw'
Date: Thu, 03 Dec 2020 15:52:44 +0000 [thread overview]
Message-ID: <jhjy2ieubsj.mognet@arm.com> (raw)
In-Reply-To: <20201203130320.GQ3021@hirez.programming.kicks-ass.net>
On 03/12/20 13:03, Peter Zijlstra wrote:
> On Thu, Nov 26, 2020 at 06:18:33PM +0000, Valentin Schneider wrote:
>> If I got the RCU bits right from what Thomas mentioned in
>>
>> https://lore.kernel.org/r/87ft5q18qs.fsf@nanos.tec.linutronix.de
>> https://lore.kernel.org/r/87lfewnmdz.fsf@nanos.tec.linutronix.de
>>
>> then we're still missing something to notify RCU in the case the IRQ hits
>> the idle task. All I see on our entry path is
>>
>> trace_hardirqs_off();
>> ...
>> irq_handler()
>> handle_domain_irq();
>> ...
>> trace_hardirqs_on();
>>
>> so we do currently rely on handle_domain_irq()'s irq_enter() + irq_exit()
>> for that. rcu_irq_enter() says CONFIG_RCU_EQS_DEBUG=y can detect missing
>> bits, but I don't get any warnings with your series on my Juno.
>
> The scheduler IPI really doesn't need RCU either ;-)
Because it doesn't enter any new read-side section, right?
But as with any other interrupt, we could then go through:
preempt_schedule_irq() ~> pick_next_task_fair() -> newidle_balance()
which does enter a read-side section, so RCU would need to be
watching. Looking at kernel/entry/common.c:irqentry_exit_cond_resched(), it
seems we do check for this via rcu_irq_exit_check_preempt().
I however cannot grok why irqentry_exit() *doesn't* call into
preempt_schedule_irq() if RCU wasn't watching on IRQ entry, so I'm starting
to question everything (again).
next prev parent reply other threads:[~2020-12-03 15:54 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 14:14 [PATCH v2 0/6] arm/arm64: Allow the rescheduling IPI to bypass irq_enter/exit Marc Zyngier
2020-11-24 14:14 ` Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 1/6] genirq: Add __irq_modify_status() helper to clear/set special flags Marc Zyngier
2020-11-24 14:14 ` Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 2/6] genirq: Allow an interrupt to be marked as 'raw' Marc Zyngier
2020-11-24 14:14 ` Marc Zyngier
2020-11-24 16:26 ` Peter Zijlstra
2020-11-24 16:26 ` Peter Zijlstra
2020-11-24 16:56 ` Marc Zyngier
2020-11-24 16:56 ` Marc Zyngier
2020-11-26 18:18 ` Valentin Schneider
2020-11-26 18:18 ` Valentin Schneider
2020-12-03 13:03 ` Peter Zijlstra
2020-12-03 13:03 ` Peter Zijlstra
2020-12-03 15:52 ` Valentin Schneider [this message]
2020-12-03 15:52 ` Valentin Schneider
2020-12-05 19:24 ` Valentin Schneider
2020-12-05 19:24 ` Valentin Schneider
2020-12-10 15:07 ` Will Deacon
2020-12-10 15:07 ` Will Deacon
2021-06-23 17:28 ` Todd Kjos
2021-06-23 17:28 ` Todd Kjos
2020-11-24 14:14 ` [PATCH v2 3/6] arm64: Mark the recheduling IPI as raw interrupt Marc Zyngier
2020-11-24 14:14 ` Marc Zyngier
2020-12-10 15:15 ` Will Deacon
2020-12-10 15:15 ` Will Deacon
2020-11-24 14:14 ` [PATCH v2 4/6] arm: " Marc Zyngier
2020-11-24 14:14 ` Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 5/6] genirq: Drop IRQ_HIDDEN from IRQF_MODIFY_MASK Marc Zyngier
2020-11-24 14:14 ` Marc Zyngier
2020-11-24 14:14 ` [PATCH v2 6/6] genirq: Rename IRQ_HIDDEN to IRQ_IPI Marc Zyngier
2020-11-24 14:14 ` Marc Zyngier
2020-11-26 18:18 ` Valentin Schneider
2020-11-26 18:18 ` Valentin Schneider
2021-03-01 0:39 ` [PATCH v2 0/6] arm/arm64: Allow the rescheduling IPI to bypass irq_enter/exit ito-yuichi
2021-03-01 0:39 ` ito-yuichi
2021-03-01 9:22 ` Marc Zyngier
2021-03-01 9:22 ` Marc Zyngier
2021-03-09 6:20 ` Yuichi Ito
2021-03-09 6:20 ` Yuichi Ito
2021-06-18 19:30 ` Abhijeet Dharmapurikar
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=jhjy2ieubsj.mognet@arm.com \
--to=valentin.schneider@arm.com \
--cc=catalin.marinas@arm.com \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.