[PATCH v4] arm64: mm: Make arch_faults_on_old_pte() check for migratability

Sebastian Andrzej Siewior bigeasy at linutronix.de
Fri Feb 4 01:29:28 PST 2022


On 2022-01-27 19:24:37 [+0000], Valentin Schneider wrote:
> arch_faults_on_old_pte() relies on the calling context being
> non-preemptible. CONFIG_PREEMPT_RT turns the PTE lock into a sleepable
> spinlock, which doesn't disable preemption once acquired, triggering the
> warning in arch_faults_on_old_pte().
> 
> It does however disable migration, ensuring the task remains on the same
> CPU during the entirety of the critical section, making the read of
> cpu_has_hw_af() safe and stable.
> 
> Make arch_faults_on_old_pte() check cant_migrate() instead of preemptible().
> 
> Suggested-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> Signed-off-by: Valentin Schneider <valentin.schneider at arm.com>
> Link: https://lore.kernel.org/r/20210811201354.1976839-5-valentin.schneider@arm.com

Let me pick that up so I can drop the other two. I hope the ARM64 folks
follow my lead ;)

Acked-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>

Sebastian



More information about the linux-arm-kernel mailing list