[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dbe56865-392e-4705-b841-5612aecd016b@arm.com>
Date: Tue, 5 Aug 2025 16:07:13 +0100
From: Ada Couprie Diaz <ada.coupriediaz@....com>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: mbenes@...e.cz, xen-devel@...ts.xenproject.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
leitao@...ian.org, ardb@...nel.org, liaochang1@...wei.com,
kristina.martsenko@....com, anshuman.khandual@....com,
chenl311@...natelecom.cn, akpm@...ux-foundation.org, ryan.roberts@....com,
broonie@...nel.org, puranjay@...nel.org, mark.rutland@....com,
sstabellini@...nel.org, oleg@...hat.com, will@...nel.org,
catalin.marinas@....com, Ada Couprie Diaz <ada.coupriediaz@....com>
Subject: Re: [PATCH -next v7 6/7] arm64: entry: Move
arm64_preempt_schedule_irq() into __exit_to_kernel_mode()
On 29/07/2025 02:54, Jinjie Ruan wrote:
> The arm64 entry code only preempts a kernel context upon a return from
> a regular IRQ exception. The generic entry code may preempt a kernel
> context for any exception return where irqentry_exit() is used, and so
> may preempt other exceptions such as faults.
>
> In preparation for moving arm64 over to the generic entry code, align
> arm64 with the generic behaviour by calling
> arm64_preempt_schedule_irq() from exit_to_kernel_mode(). To make this
> possible, arm64_preempt_schedule_irq()
> and dynamic/raw_irqentry_exit_cond_resched() are moved earlier in
> the file, with no changes.
>
> As Mark pointed out, this change will have the following 2 key impact:
>
> - " We'll preempt even without taking a "real" interrupt. That
> shouldn't result in preemption that wasn't possible before,
> but it does change the probability of preempting at certain points,
> and might have a performance impact, so probably warrants a
> benchmark."
>
> - " We will not preempt when taking interrupts from a region of kernel
> code where IRQs are enabled but RCU is not watching, matching the
> behaviour of the generic entry code.
>
> This has the potential to introduce livelock if we can ever have a
> screaming interrupt in such a region, so we'll need to go figure out
> whether that's actually a problem.
>
> Having this as a separate patch will make it easier to test/bisect
> for that specifically."
>
> Suggested-by: Mark Rutland <mark.rutland@....com>
> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
> ---
Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@....com>
Powered by blists - more mailing lists