Re: [RFC PATCH] sched: Fix integer overflow issue of cpu weight delta
From: Peter Zijlstra
Date: Mon Dec 02 2024 - 05:41:16 EST
On Mon, Dec 02, 2024 at 06:13:44PM +0800, I Hsin Cheng wrote:
> I think there's one point to concern, do we have a fixed range of
> "tg_weight()" ?
kernel/sched/fair.c:__sched_group_set_shares()
shares = clamp(shares, scale_load(MIN_SHARES), scale_load(MAX_SHARES));
if (tg->shares == shares)
return 0;
tg->shares = shares;