Re: [RFC PATCH] preempt: Add a generic function to return the preemption string.
From: Peter Zijlstra
Date: Thu Jan 09 2025 - 09:54:19 EST
On Thu, Jan 09, 2025 at 03:41:24PM +0100, Sebastian Andrzej Siewior wrote:
> On 2025-01-09 15:37:01 [+0100], Peter Zijlstra wrote:
> > Upgrade brain. Also the proposed thing was just plain wrong.
>
> Was it?
Yes, things like:
> + if (preempt_model_voluntary())
> + return "VOLUNTARY+LAZY";
> + if (preempt_model_none())
> + return "NONE+LAZY";
don't exist and make no sense.
> For the !DYNAMIC case everything should be optimized away except
> for the current case.
> Let me try your thing to see what is different…
For the various cases it was supposed to print something like so:
RT+DYN: PREEMPT_{RT,(dyn_mode)}
RT+LAZY: PREEMPT_{RT,LAZY}
RT+FULL: PREEMPT_RT
DYN: PREEMPT_(dyn_mode)
FULL: PREEMPT
LAZY: PREEMPT_LAZY
VOLUNTARY: VOLUNTARY
NONE: NONE