lkml.org 
[lkml]   [2023]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 11/23] sched: Add a initial sketch of the find_proxy_task() function
On Thu, Dec 21, 2023 at 4:55 AM Metin Kaya <metin.kaya@arm.com> 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

\
 
 \ /
  Last update: 2023-12-21 20:15    [W:0.074 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site