Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-04-19 Thread changhuaixin
> On Mar 18, 2021, at 11:10 PM, Peter Zijlstra wrote: > > On Thu, Mar 18, 2021 at 08:59:44AM -0400, Phil Auld wrote: >> I admit to not having followed all the history of this patch set. That >> said, when I see the above I just think your quota is too low for your >> workload. > > This. >

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-19 Thread changhuaixin
> On Mar 19, 2021, at 8:39 PM, changhuaixin > wrote: > > > >> On Mar 18, 2021, at 11:05 PM, Peter Zijlstra wrote: >> >> On Thu, Mar 18, 2021 at 09:26:58AM +0800, changhuaixin wrote: On Mar 17, 2021, at 4:06 PM, Peter Zijlstra wrote: >> So what is the typical avg,stdev,max and

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-19 Thread changhuaixin
> On Mar 18, 2021, at 8:59 PM, Phil Auld wrote: > > On Thu, Mar 18, 2021 at 09:26:58AM +0800 changhuaixin wrote: >> >> >>> On Mar 17, 2021, at 4:06 PM, Peter Zijlstra wrote: >>> >>> On Wed, Mar 17, 2021 at 03:16:18PM +0800, changhuaixin wrote: >>> > Why do you allow such a large

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-19 Thread changhuaixin
> On Mar 18, 2021, at 11:05 PM, Peter Zijlstra wrote: > > On Thu, Mar 18, 2021 at 09:26:58AM +0800, changhuaixin wrote: >>> On Mar 17, 2021, at 4:06 PM, Peter Zijlstra wrote: > >>> So what is the typical avg,stdev,max and mode for the workloads where you >>> find >>> you need this? >>>

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-18 Thread Peter Zijlstra
On Thu, Mar 18, 2021 at 08:59:44AM -0400, Phil Auld wrote: > I admit to not having followed all the history of this patch set. That > said, when I see the above I just think your quota is too low for your > workload. This. > The burst (mis?)feature seems to be a way to bypass the quota. And it

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-18 Thread Peter Zijlstra
On Thu, Mar 18, 2021 at 09:26:58AM +0800, changhuaixin wrote: > > On Mar 17, 2021, at 4:06 PM, Peter Zijlstra wrote: > > So what is the typical avg,stdev,max and mode for the workloads where you > > find > > you need this? > > > > I would really like to put a limit on the burst. IMO a workload

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-18 Thread Phil Auld
On Thu, Mar 18, 2021 at 09:26:58AM +0800 changhuaixin wrote: > > > > On Mar 17, 2021, at 4:06 PM, Peter Zijlstra wrote: > > > > On Wed, Mar 17, 2021 at 03:16:18PM +0800, changhuaixin wrote: > > > >>> Why do you allow such a large burst? I would expect something like: > >>> > >>> if (burst

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-17 Thread changhuaixin
> On Mar 17, 2021, at 4:06 PM, Peter Zijlstra wrote: > > On Wed, Mar 17, 2021 at 03:16:18PM +0800, changhuaixin wrote: > >>> Why do you allow such a large burst? I would expect something like: >>> >>> if (burst > quote) >>> return -EINVAL; >>> >>> That limits the variance

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-17 Thread Peter Zijlstra
On Wed, Mar 17, 2021 at 03:16:18PM +0800, changhuaixin wrote: > > Why do you allow such a large burst? I would expect something like: > > > > if (burst > quote) > > return -EINVAL; > > > > That limits the variance in the system. Allowing super long bursts seems > > to defeat the

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-17 Thread changhuaixin
> On Mar 16, 2021, at 5:54 PM, Peter Zijlstra wrote: > > On Tue, Mar 16, 2021 at 12:49:28PM +0800, Huaixin Chang wrote: >> @@ -8982,6 +8983,12 @@ static int tg_set_cfs_bandwidth(struct task_group >> *tg, u64 period, u64 quota) >> if (quota != RUNTIME_INF && quota > max_cfs_runtime) >>

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-16 Thread Peter Zijlstra
On Tue, Mar 16, 2021 at 12:49:28PM +0800, Huaixin Chang wrote: > And the maximun amount of CPU a group can consume in > a given period is "buffer" which is equivalent to "quota" + "burst in > case that this group has done enough accumulation. I'm confused as heck about cfs_b->buffer. Why do you

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-16 Thread Peter Zijlstra
On Tue, Mar 16, 2021 at 12:49:28PM +0800, Huaixin Chang wrote: > @@ -8982,6 +8983,12 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, > u64 period, u64 quota) > if (quota != RUNTIME_INF && quota > max_cfs_runtime) > return -EINVAL; > > + /* > + * Bound

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-16 Thread Peter Zijlstra
On Tue, Mar 16, 2021 at 12:49:28PM +0800, Huaixin Chang wrote: > In this patch, we introduce the notion of CFS bandwidth burst. Unused > "quota" from pervious "periods" might be accumulated and used in the > following "periods". The maximum amount of accumulated bandwidth is > bounded by "burst".

Re: [PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-16 Thread Peter Zijlstra
On Tue, Mar 16, 2021 at 12:49:28PM +0800, Huaixin Chang wrote: > In this patch, we introduce the notion of CFS bandwidth burst. Unused Documentation/process/submitting-patches.rst:instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy

[PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-15 Thread Huaixin Chang
In this patch, we introduce the notion of CFS bandwidth burst. Unused "quota" from pervious "periods" might be accumulated and used in the following "periods". The maximum amount of accumulated bandwidth is bounded by "burst". And the maximun amount of CPU a group can consume in a given period is