Re: [PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-20 Thread Sironi, Filippo
> On 19. Dec 2017, at 20:33, Peter Zijlstra wrote: > > On Sat, Dec 09, 2017 at 09:03:49AM +0100, Filippo Sironi wrote: >> ... since total = sched_avg_period() + delta can yield 0x1, >> which results in a division by 0, given that div_u64() takes a u32 >> divisor.

Re: [PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-20 Thread Sironi, Filippo
> On 19. Dec 2017, at 20:33, Peter Zijlstra wrote: > > On Sat, Dec 09, 2017 at 09:03:49AM +0100, Filippo Sironi wrote: >> ... since total = sched_avg_period() + delta can yield 0x1, >> which results in a division by 0, given that div_u64() takes a u32 >> divisor. Use div64_u64()

Re: [PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-19 Thread Peter Zijlstra
On Sat, Dec 09, 2017 at 09:03:49AM +0100, Filippo Sironi wrote: > ... since total = sched_avg_period() + delta can yield 0x1, > which results in a division by 0, given that div_u64() takes a u32 > divisor. Use div64_u64() instead. > > divide error: [#1] SMP > CPU: 7 PID: 0 Comm:

Re: [PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-19 Thread Peter Zijlstra
On Sat, Dec 09, 2017 at 09:03:49AM +0100, Filippo Sironi wrote: > ... since total = sched_avg_period() + delta can yield 0x1, > which results in a division by 0, given that div_u64() takes a u32 > divisor. Use div64_u64() instead. > > divide error: [#1] SMP > CPU: 7 PID: 0 Comm:

Re: [PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-11 Thread Rohit Jain
Hi Filippo, On 12/09/2017 12:03 AM, Filippo Sironi wrote: ... since total = sched_avg_period() + delta can yield 0x1, which results in a division by 0, given that div_u64() takes a u32 divisor. Use div64_u64() instead. divide error: [#1] SMP CPU: 7 PID: 0 Comm: swapper/7 Not

Re: [PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-11 Thread Rohit Jain
Hi Filippo, On 12/09/2017 12:03 AM, Filippo Sironi wrote: ... since total = sched_avg_period() + delta can yield 0x1, which results in a division by 0, given that div_u64() takes a u32 divisor. Use div64_u64() instead. divide error: [#1] SMP CPU: 7 PID: 0 Comm: swapper/7 Not

[PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-09 Thread Filippo Sironi
... since total = sched_avg_period() + delta can yield 0x1, which results in a division by 0, given that div_u64() takes a u32 divisor. Use div64_u64() instead. divide error: [#1] SMP CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.9.58 #1 Hardware name: ... task: 8800a24e2800

[PATCH] sched/fair: Prevent a division by 0 in scale_rt_capacity()

2017-12-09 Thread Filippo Sironi
... since total = sched_avg_period() + delta can yield 0x1, which results in a division by 0, given that div_u64() takes a u32 divisor. Use div64_u64() instead. divide error: [#1] SMP CPU: 7 PID: 0 Comm: swapper/7 Not tainted 4.9.58 #1 Hardware name: ... task: 8800a24e2800