Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-08 Thread Peter Zijlstra
On Mon, Oct 07, 2019 at 11:14:25AM -0400, Phil Auld wrote: > On Thu, Oct 03, 2019 at 05:12:43PM -0700 Xuewei Zhang wrote: > > quota/period ratio is used to ensure a child task group won't get more > > bandwidth than the parent task group, and is calculated as: > > normalized_cfs_quota() =

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-07 Thread Xuewei Zhang
On Mon, Oct 7, 2019 at 8:14 AM Phil Auld wrote: > > On Thu, Oct 03, 2019 at 05:12:43PM -0700 Xuewei Zhang wrote: > > quota/period ratio is used to ensure a child task group won't get more > > bandwidth than the parent task group, and is calculated as: > > normalized_cfs_quota() = [(quota_us <<

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-07 Thread Phil Auld
On Thu, Oct 03, 2019 at 05:12:43PM -0700 Xuewei Zhang wrote: > quota/period ratio is used to ensure a child task group won't get more > bandwidth than the parent task group, and is calculated as: > normalized_cfs_quota() = [(quota_us << 20) / period_us] > > If the quota/period ratio was changed

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-07 Thread Phil Auld
Hi Xuewei, On Fri, Oct 04, 2019 at 05:28:15PM -0700 Xuewei Zhang wrote: > On Fri, Oct 4, 2019 at 6:14 AM Phil Auld wrote: > > > > On Thu, Oct 03, 2019 at 07:05:56PM -0700 Xuewei Zhang wrote: > > > +cc neeln...@google.com and hao...@google.com, they helped a lot > > > for this issue. Sorry I

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-04 Thread Xuewei Zhang
On Fri, Oct 4, 2019 at 6:14 AM Phil Auld wrote: > > On Thu, Oct 03, 2019 at 07:05:56PM -0700 Xuewei Zhang wrote: > > +cc neeln...@google.com and hao...@google.com, they helped a lot > > for this issue. Sorry I forgot to include them when sending out the patch. > > > > On Thu, Oct 3, 2019 at 5:55

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-04 Thread Phil Auld
On Thu, Oct 03, 2019 at 07:05:56PM -0700 Xuewei Zhang wrote: > +cc neeln...@google.com and hao...@google.com, they helped a lot > for this issue. Sorry I forgot to include them when sending out the patch. > > On Thu, Oct 3, 2019 at 5:55 PM Phil Auld wrote: > > > > Hi, > > > > On Thu, Oct 03,

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-04 Thread Greg KH
On Thu, Oct 03, 2019 at 05:12:43PM -0700, Xuewei Zhang wrote: > quota/period ratio is used to ensure a child task group won't get more > bandwidth than the parent task group, and is calculated as: > normalized_cfs_quota() = [(quota_us << 20) / period_us] > > If the quota/period ratio was changed

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-03 Thread Xuewei Zhang
+cc neeln...@google.com and hao...@google.com, they helped a lot for this issue. Sorry I forgot to include them when sending out the patch. On Thu, Oct 3, 2019 at 5:55 PM Phil Auld wrote: > > Hi, > > On Thu, Oct 03, 2019 at 05:12:43PM -0700 Xuewei Zhang wrote: > > quota/period ratio is used to

Re: [PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-03 Thread Phil Auld
Hi, On Thu, Oct 03, 2019 at 05:12:43PM -0700 Xuewei Zhang wrote: > quota/period ratio is used to ensure a child task group won't get more > bandwidth than the parent task group, and is calculated as: > normalized_cfs_quota() = [(quota_us << 20) / period_us] > > If the quota/period ratio was

[PATCH] sched/fair: scale quota and period without losing quota/period ratio precision

2019-10-03 Thread Xuewei Zhang
quota/period ratio is used to ensure a child task group won't get more bandwidth than the parent task group, and is calculated as: normalized_cfs_quota() = [(quota_us << 20) / period_us] If the quota/period ratio was changed during this scaling due to precision loss, it will cause inconsistency