Re: [PATCH v2 1/9] sched: Add a generic function to return the preemption string.

From: Shrikanth Hegde
Date: Mon Feb 10 2025 - 09:23:08 EST




On 2/10/25 16:22, Sebastian Andrzej Siewior wrote:
On 2025-02-08 13:31:27 [+0530], Shrikanth Hegde wrote:
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 165c90ba64ea9..bd2664755b09a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c

[...]

nit: This means when it preempt=full, it is going to show PREEMPT or
PREEMPT_RT. Maybe that could be put into changelog or add code similar to
lazy for full as well, so it is easier for user to know if it is in
preempt=full model. In all other models, there is a suffix like PREEMPTLAZY.
Dynamic modes looks good.

Sorry, I can't follow. With PREEMPT_RT enabled, it will show einer
PREEMPT or PREEMPT_RT. It will add lazy if you pass preempt=lazy. It is
either 'full' or 'lazy'.
You can't have VOLUNTARY+lazy or VOLUNTARY+RT.

What do I miss?

No No. That's not what i meant.

I was saying, as peter mentioned in the previous discussion, can we put something like below in changelog/comment for a easier understanding.?

"
RT+DYN: PREEMPT_{RT,(dyn_mode)}
RT+LAZY: PREEMPT_{RT,LAZY}
RT+FULL: PREEMPT_RT

DYN: PREEMPT_(dyn_mode)
FULL: PREEMPT
LAZY: PREEMPTLAZY
VOLUNTARY: VOLUNTARY
NONE: NONE
"


Sebastian