[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@xxxxxxx>
Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
---

Reviewed-by: Ada Couprie Diaz <ada.coupriediaz@xxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.