[PATCH v2 0/2] Fix SCHED_IDLE behavior on wakeup preemption

Abel Wu posted 2 patches 9 months, 3 weeks ago
There is a newer version of this series
kernel/sched/fair.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
[PATCH v2 0/2] Fix SCHED_IDLE behavior on wakeup preemption
Posted by Abel Wu 9 months, 3 weeks ago
The commit 6bc912b71b6f ("sched: SCHED_OTHER vs SCHED_IDLE isolation")
defines the behavior of SCHED_IDLE as following:

 - no SCHED_IDLE buddies
 - never let SCHED_IDLE preempt on wakeup
 - always preempt SCHED_IDLE on wakeup
 - limit SLEEPER fairness for SCHED_IDLE

and the middle two of them are broken now.

v2:
 - Collect Reviewed-by tags from Vincent, Josh and Madadi, thanks!
 - Rebased to up-to-date tip. (Madadi)
 - Folded some discussion with Vincent into commit log.

Abel Wu (2):
  sched/fair: Do not let idle entities preempt others
  sched/fair: Fix premature check of WAKEUP_PREEMPTION

 kernel/sched/fair.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

-- 
2.37.3
Re: [PATCH v2 0/2] Fix SCHED_IDLE behavior on wakeup preemption
Posted by K Prateek Nayak 9 months, 3 weeks ago
Hello Abel,

On 2/27/2025 2:28 PM, Abel Wu wrote:
> The commit 6bc912b71b6f ("sched: SCHED_OTHER vs SCHED_IDLE isolation")
> defines the behavior of SCHED_IDLE as following:
> 
>   - no SCHED_IDLE buddies
>   - never let SCHED_IDLE preempt on wakeup
>   - always preempt SCHED_IDLE on wakeup
>   - limit SLEEPER fairness for SCHED_IDLE
> 
> and the middle two of them are broken now.

Feel free to include:

Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
-- 
Thanks and Regards,
Prateek

> 
> v2:
>   - Collect Reviewed-by tags from Vincent, Josh and Madadi, thanks!
>   - Rebased to up-to-date tip. (Madadi)
>   - Folded some discussion with Vincent into commit log.
> 
> Abel Wu (2):
>    sched/fair: Do not let idle entities preempt others
>    sched/fair: Fix premature check of WAKEUP_PREEMPTION
> 
>   kernel/sched/fair.c | 14 ++++++++------
>   1 file changed, 8 insertions(+), 6 deletions(-)
>
Re: Re: [PATCH v2 0/2] Fix SCHED_IDLE behavior on wakeup preemption
Posted by Abel Wu 9 months, 3 weeks ago
On 2/28/25 4:05 PM, K Prateek Nayak wrote:
> Hello Abel,
> 
> On 2/27/2025 2:28 PM, Abel Wu wrote:
>> The commit 6bc912b71b6f ("sched: SCHED_OTHER vs SCHED_IDLE isolation")
>> defines the behavior of SCHED_IDLE as following:
>>
>>   - no SCHED_IDLE buddies
>>   - never let SCHED_IDLE preempt on wakeup
>>   - always preempt SCHED_IDLE on wakeup
>>   - limit SLEEPER fairness for SCHED_IDLE
>>
>> and the middle two of them are broken now.
> 
> Feel free to include:
> 
> Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>

Thanks!