Messages in this thread | | | Date | Thu, 24 Nov 2022 10:12:43 +0100 | From | Peter Zijlstra <> | Subject | Re: [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.
| |