Re: [PATCH] powerpc/entry: Fix double accounting of user time on interrupt entry
From: Christophe Leroy (CS GROUP)
Date: Thu Sep 03 2026 - 00:51:30 EST
Hi Aboorva,
Le 02/09/2026 à 21:44, Aboorva Devarajan a écrit :
The history is as follows:
Commit 09a9d3a8499d ("powerpc: introduce arch_enter_from_user_mode")
introduced the arch_enter_from_user_mode() function with the accounting,
but the function was not called at that point. Commit 893082ac769b
("powerpc: Prepare for IRQ entry exit") introduced arch_interrupt_enter_prepare()
and copied the accounting from interrupt_enter_prepare() into it, but the
new helper was not used either. Both changes were preparatory and did not
change the accounting behavior.
Commit bee25f97ad24 ("powerpc: Enable GENERIC_ENTRY feature") made both paths
active. The syscall path removed its open-coded account_cpu_user_entry() and
started accounting through arch_enter_from_user_mode(). But the interrupt path
started using arch_interrupt_enter_prepare() followed by irqentry_enter(),
which also invokes arch_enter_from_user_mode(), while the accounting in
arch_interrupt_enter_prepare() remained. This resulted in the same user-time
interval being accounted twice for interrupts taken from user mode.
I used bee25f97ad24 ("powerpc: Enable GENERIC_ENTRY feature") as the Fixes
tag because 893082ac769b only introduced the accounting call while
arch_interrupt_enter_prepare() was unused. bee25f97ad24 is where the duplicate
accounting actually became functional.
Would it be ok to keep bee25f97ad24 as the Fixes tag? Please let me know if
you think 893082ac769b would be more appropriate.
Ok, lets keep bee25f97ad24, I guess a bisect would land here. Anyway they all appear for the first time in v7.2
Christophe