lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] sched: async unthrottling for cfs bandwidth
On Tue, Nov 22, 2022 at 11:41:04AM -0800, Josh Don wrote:
> > > + */
> > > + 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?

Done, should be pushed into the queue.git thing momentarily.

\
 
 \ /
  Last update: 2022-11-24 10:13    [W:0.106 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site