From linux-kernel Tue Apr 23 16:13:34 2024 From: Linus Torvalds Date: Tue, 23 Apr 2024 16:13:34 +0000 To: linux-kernel Subject: Re: [PATCH 00/30] PREEMPT_AUTO: support lazy rescheduling Message-Id: X-MARC-Message: https://marc.info/?l=linux-kernel&m=171388871619115 On Tue, 23 Apr 2024 at 08:23, Shrikanth Hegde wrote: > > Tried this patch on PowerPC by defining LAZY similar to x86. The change is below. > Kept it at PREEMPT=none for PREEMPT_AUTO. > > Running into soft lockup on large systems (40Cores, SMT8) and seeing close to 100% > regression on small system ( 12 Cores, SMT8). More details are after the patch. > > Are these the only arch bits that need to be defined? am I missing something very > basic here? will try to debug this further. Any inputs? I don't think powerpc uses the generic *_exit_to_user_mode() helper functions, so you'll need to also add that logic to the low-level powerpc code. IOW, on x86, with this patch series, patch 06/30 did this: - if (ti_work & _TIF_NEED_RESCHED) + if (ti_work & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY)) schedule(); in kernel/entry/common.c exit_to_user_mode_loop(). But that works on x86 because it uses the irqentry_exit_to_user_mode(). On PowerPC, I think you need to at least fix up interrupt_exit_user_prepare_main() similarly (and any other paths like that - I used to know the powerpc code, but that was long long LOOONG ago). Linus