Re: [RFC PATCH v2 20/23] sched/cache: Estimate utilization of the whole thread group

From: Peter Zijlstra

Date: Tue Sep 01 2026 - 11:02:53 EST


On Fri, Aug 28, 2026 at 10:11:56AM +0800, Jianyong Wu wrote:

> + mm_util = mul_u64_u32_div(cpu_util,
> + min_t(unsigned long, occ, NICE_0_LOAD),
> + NICE_0_LOAD);

mul_u64_u32_shr(..., NICE_0_LOAD_SHIFT);

will probably generate better code -- I *think* the mul_u64_u32_div()
ends up being inline asm and as such cannot optimize the divide
properly.