Re: [PATCH v2 1/2] sched/fair: reuse the ENQUEUE_DELAYED calculation in enqueue_task_fair()
From: K Prateek Nayak
Date: Wed Aug 26 2026 - 06:47:02 EST
On 8/26/2026 3:45 PM, Kayra Cizmeci wrote:
> @@ -7996,12 +7996,12 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
> * Let's add the task's estimated utilization to the cfs_rq's
> * estimated utilization, before we update schedutil.
> */
> - if (!p->se.sched_delayed || (flags & ENQUEUE_DELAYED))
> + if (!p->se.sched_delayed || delayed)
nit. This reads funny now - not delayed or delayed?
Maybe wakeup_delayed but all of this should be optimized by compiler
at the end and a big ENQUEUE_DELAYED is better for humans who are
reading the code no?
> util_est_enqueue(cfs_rq, p);
>
> update_curr_eevdf(cfs_rq);
>
> - if (flags & ENQUEUE_DELAYED) {
> + if (delayed) {
> requeue_delayed_entity(cfs_rq, se);
> return;
> }
--
Thanks and Regards,
Prateek