Re: [PATCH 0/4] sched: Various reweight_entity() fixes

From: K Prateek Nayak

Date: Fri Feb 13 2026 - 00:23:00 EST


On 2/13/2026 1:01 AM, Peter Zijlstra wrote:
> On Thu, Feb 12, 2026 at 06:24:27PM +0100, Vincent Guittot wrote:
>
>>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>>> index 5b1a2abb727e..de155be02411 100644
>>> --- a/kernel/sched/fair.c
>>> +++ b/kernel/sched/fair.c
>>> @@ -797,7 +797,11 @@ u64 avg_vruntime(struct cfs_rq *cfs_rq)
>>> if (runtime < 0)
>>> runtime -= (weight - 1);
>>>
>>> +#ifndef CONFIG_64BIT
>>> delta = div_s64(runtime, weight);
>>> +#else
>>> + delta = runtime / weight;
>>> +#endif
>>
>> Good catch
>>
>> Don't we have the same problem with the div_s64 in place_entity ?
>
> Indeed so. Let me go fix both and push out a new set. I'll post all the
> patches tomorrow once the robot has blessed them.

rescale_entity() adds a bunch more of those. Don't those need changing
too? (I'm looking at the current sched/core at b4d41dc4bf30). And a
wrapper around this pattern would be much appreciated with the amount
of ifdeffry that gets added

--
Thanks and Regards,
Prateek