Re: [PATCH v7 11/23] sched: Add a initial sketch of the find_proxy_task() function

From: John Stultz
Date: Thu Dec 21 2023 - 14:14:46 EST


On Thu, Dec 21, 2023 at 4:55 AM Metin Kaya <metin.kaya@xxxxxxx> wrote:
> On 20/12/2023 12:18 am, John Stultz wrote:
> >
> Super-nit: s/Add a/Add an/ in commit header.

Thanks for catching that!

> > +#ifdef CONFIG_SCHED_PROXY_EXEC
> > +static inline bool task_is_blocked(struct task_struct *p)
> > +{
> > + if (!sched_proxy_exec())
> > + return false;
> > +
> > + return !!p->blocked_on && p->blocked_on_state != BO_RUNNABLE;
> > +}
> > +#else /* !SCHED_PROXY_EXEC */
> > +static inline bool task_is_blocked(struct task_struct *p)
> > +{
> > + return false;
> > +}
> > +#endif /* SCHED_PROXY_EXEC */
> > +
>
> We can drop #else part, IMHO. Because sched_proxy_exec() already returns
> false in !CONFIG_SCHED_PROXY_EXEC case.

Oh, good point. That is a nice simplification.

thanks
-john