lkml.org 
[lkml]   [2022]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] sched: async unthrottling for cfs bandwidth
> > +        */
> > + if (local_unthrottle) {
> > + rq = cpu_rq(this_cpu);
> > + rq_lock_irqsave(rq, &rf);
>
> Should we add:
> if (cfs_rq_throttled(local_unthrottle))
>
> before calling into unthrottle_cfs_rq_async(local_unthrottle) to avoid a
> potential WARN?
>
> As for whether the local cfs_rq can be unthrottled now after rq lock is
> re-acquired, I suppose it can be. e.g. another user sets a new quota to
> this task group during the window of rq lock gets dropped in the above
> loop and re-acquired here IIUC.
>
> > + unthrottle_cfs_rq_async(local_unthrottle);
> > + rq_unlock_irqrestore(rq, &rf);
> > + }
> > +
> > return throttled;
> > }

Yes, we should add that check due to the case you described with a
user concurrently configuring bandwidth. And as long as we're doing
that, we might as well make this unthrottle_cfs_rq() instead and snip
the comment. Peter, would you mind adding that delta?

\
 
 \ /
  Last update: 2022-11-22 20:42    [W:0.303 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site