Re: [PATCH v4 1/1] powerpc: enable dynamic preemption
"Paul E. McKenney" <[email protected]> Fri, 31 Jul 2026 11:11:29 -0700
| Newsgroups | org.ozlabs.lists.linuxppc-dev,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <c85a1f0a-d702-4470-b2d5-c308805acebb@paulmck-laptop> |
On Fri, Jul 31, 2026 at 11:27:06PM +0530, Shrikanth Hegde wrote: > Hi Jirka. > > On 7/31/26 7:20 PM, Jirka Hladky wrote: > > On Fri, Jul 31, 2026 at 10:03 AM Shrikanth Hegde <[email protected]> wrote: > > > Coming into numbers, I did notice later, arm64 numbers are almost 20x less. > > > But if we compare the time taken for each operations, it tells a > > > different story. > > > > > The bottom line: PREEMPT_DYNAMIC/preempt_count overhead is present > > on both RISC architectures but its visibility depends heavily on the > > workload profile and hardware topology. > > > > > PS: I tried porting some of those changes in arm64 to powerpc to > > > split preempt count into two. but i don;t see much improvement > > > there. > > I tried moving to PACA plus splitting 64 bit into need_resched and preempt > count. But it doesn;t move the needle. But it maybe worth pursuing, > since it could help preemption modes. It needs more work and needs numbers > across benchmark. > > > Thanks for trying. Paul questioned whether barriers are actually > > needed for preempt_count, or whether software interrupt disabling > > would suffice (his words: "I can see why the preempt_count() > > operations need to be interrupt-safe, but I don't see why you would > > need barriers"). Any thoughts on whether that's feasible for > > powerpc? > > Barrier are likely not the concern as it is mostly nop. > Also, soft disabling interrupts needs to arch specific hooks to setup > before preempt_disable and replay interrupts after preempt_enable. > I don't think it would benefit since interrupt disabling during this likely > shouldn't happen. Maybe I don't understand how that could work. For some reason, I remembered powerpc software-disabling interrupts, but when I go look now, there is no such thing. Maybe powerpc used to but no longer does. Or maybe I am just hallucinating. ;-) Thanx, Paul