Messages in this thread | | | Date | Mon, 11 May 2020 15:03:27 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v2] sched: Defend cfs and rt bandwidth quota against overflow |
| |
On Mon, Apr 27, 2020 at 11:29:30AM -0700, bsegall@google.com wrote: > Huaixin Chang <changhuaixin@linux.alibaba.com> writes: > > > When users write some huge number into cpu.cfs_quota_us or > > cpu.rt_runtime_us, overflow might happen during to_ratio() shifts of > > schedulable checks. > > > > to_ratio() could be altered to avoid unnecessary internal overflow, but > > min_cfs_quota_period is less than 1 << BW_SHIFT, so a cutoff would still > > be needed. Set a cap MAX_BW for cfs_quota_us and rt_runtime_us to > > prevent overflow. > > Reviewed-by: Ben Segall <bsegall@google.com>
Thanks!
| |