[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7a81f13-6f09-4a7a-9d85-0ba4885442bc@bytedance.com>
Date: Sun, 23 Feb 2025 16:45:54 +0800
From: Abel Wu <wuyun.abel@...edance.com>
To: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Cc: "open list:SCHEDULER" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Josh Don <joshdon@...gle.com>,
Valentin Schneider <vschneid@...hat.com>,
Tianchen Ding <dtcccc@...ux.alibaba.com>
Subject: Re: Re: [PATCH 1/2] sched/fair: Do not let idle entities preempt
others
On 2/23/25 1:48 AM, Madadi Vineeth Reddy Wrote:
> On 21/02/25 16:42, Abel Wu wrote:
>> A task with SCHED_IDLE policy doesn't preempt others by definition, and
>> the semantics are intended to be preserved when extending to cgroups
>> introduced in commit 304000390f88 ("sched: Cgroup SCHED_IDLE support").
>
> [snip]
>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 1c0ef435a7aa..4340178f29b7 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -8778,12 +8778,15 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
>> pse_is_idle = se_is_idle(pse);
>>
>> /*
>> - * Preempt an idle entity in favor of a non-idle entity (and don't preempt
>> - * in the inverse case).
>> + * Preempt an idle entity in favor of a non-idle entity.
>> */
>> if (cse_is_idle && !pse_is_idle)
>> goto preempt;
>
> This patch doesn't apply cleanly on top of tip/sched/core because of the
> commit f553741ac8c0 ("sched: Cancel the slice protection of the idle entity").
> Please rebase it.
Will rebase. Thanks!
>
> Thanks,
> Madadi Vineeth Reddy
>
>> - if (cse_is_idle != pse_is_idle)
>> +
>> + /*
>> + * IDLE entities do not preempt others.
>> + */
>> + if (unlikely(pse_is_idle))
>> return;
>>
>> /*
>
Powered by blists - more mailing lists