lkml.org 
[lkml]   [2022]   [Nov]   [21]   [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 Sun, Nov 20, 2022 at 10:22:40AM +0800, Chengming Zhou wrote:
> > + if (cfs_rq->runtime_remaining > 0) {
> > + if (cpu_of(rq) != this_cpu ||
> > + SCHED_WARN_ON(local_unthrottle)) {
> > + unthrottle_cfs_rq_async(cfs_rq);
> > + } else {
> > + local_unthrottle = cfs_rq;
> > + }
> > + } else {
> > + throttled = true;
> > + }
>
> Hello,
>
> I don't get the point why local unthrottle is put after all the remote cpus,
> since this list is FIFO? (earliest throttled cfs_rq is at the head)

Let the local completion time for a CPU be W. Then if we queue a remote
work after the local synchronous work, the lower bound for total
completion is at least 2W.

OTOH, if we first queue all remote work and then process the local
synchronous work, the lower bound for total completion is W.

The practical difference is that all relevant CPUs get unthrottled
rougly at the same point in time, unlike with the original case, where
some CPUs have the opportunity to consume W runtime while another is
still throttled.

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