Re: [PATCH] sched,psi: fix the 'int' underflow for psi

2021-04-15 Thread Charan Teja Kalla
Thanks Johannes!! On 4/15/2021 8:12 PM, Johannes Weiner wrote: > Makes sense, it's more graceful in the event of a bug. > > But what motivates this change? Is it something you hit recently with > an upstream kernel and we should investigate? We specifically didn't hit the issue around this chang

Re: [PATCH] sched,psi: fix the 'int' underflow for psi

2021-04-15 Thread Johannes Weiner
On Thu, Apr 15, 2021 at 07:59:41PM +0530, Charan Teja Reddy wrote: > psi_group_cpu->tasks, represented by the unsigned int, stores the number > of tasks that could be stalled on a psi resource(io/mem/cpu). > Decrementing these counters at zero leads to wrapping which further > leads to the psi_grou

[PATCH] sched,psi: fix the 'int' underflow for psi

2021-04-15 Thread Charan Teja Reddy
psi_group_cpu->tasks, represented by the unsigned int, stores the number of tasks that could be stalled on a psi resource(io/mem/cpu). Decrementing these counters at zero leads to wrapping which further leads to the psi_group_cpu->state_mask is being set with the respective pressure state. This cou