[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0ac6885-96df-4a44-9ab8-f80f5f334e84@amd.com>
Date: Mon, 14 Apr 2025 08:58:59 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: John Stultz <jstultz@...gle.com>, LKML <linux-kernel@...r.kernel.org>
CC: Valentin Schneider <valentin.schneider@....com>, Joel Fernandes
<joelagnelf@...dia.com>, Qais Yousef <qyousef@...alina.io>, 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>, Valentin Schneider
<vschneid@...hat.com>, Steven Rostedt <rostedt@...dmis.org>, Ben Segall
<bsegall@...gle.com>, Zimuzo Ezeozue <zezeozue@...gle.com>, Mel Gorman
<mgorman@...e.de>, Will Deacon <will@...nel.org>, Waiman Long
<longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>, "Paul E. McKenney"
<paulmck@...nel.org>, Metin Kaya <Metin.Kaya@....com>, Xuewen Yan
<xuewen.yan94@...il.com>, Thomas Gleixner <tglx@...utronix.de>, Daniel
Lezcano <daniel.lezcano@...aro.org>, Suleiman Souhlal <suleiman@...gle.com>,
<kernel-team@...roid.com>, Connor O'Brien <connoro@...gle.com>
Subject: Re: [PATCH v16 6/7] sched: Fix proxy/current (push,pull)ability
Hello John,
On 4/12/2025 11:32 AM, John Stultz wrote:
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index ad45a8fea245e..eb07c3a1b8fa4 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -2166,6 +2166,9 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags)
> if (dl_server(&p->dl))
> return;
>
> + if (task_is_blocked(p))
> + return;
> +
> if (!task_current(rq, p) && !p->dl.dl_throttled && p->nr_cpus_allowed > 1)
> enqueue_pushable_dl_task(rq, p);
> }
Do we need an early return in put_prev_task_dl() similar to the one in
put_prev_task_rt()?
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index fa03ec3ed56a2..87ccd5d5375a3 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -1477,6 +1477,9 @@ enqueue_task_rt(struct rq *rq, struct task_struct *p, int flags)
>
> enqueue_rt_entity(rt_se, flags);
>
> + if (task_is_blocked(p))
> + return;
> +
> if (!task_current(rq, p) && p->nr_cpus_allowed > 1)
> enqueue_pushable_task(rq, p);
> }
> @@ -1757,6 +1760,8 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p, struct task_s
>
> update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 1);
>
> + if (task_is_blocked(p))
> + return;
> /*
> * The previous task needs to be made eligible for pushing
> * if it is still active
--
Thanks and Regards,
Prateek
Powered by blists - more mailing lists