Re: [PATCH -next] cgroup/cpuset: reduce redundant comparisons for generating shecd domains

From: chenridong
Date: Sat Jul 27 2024 - 03:26:37 EST




On 2024/7/26 19:37, Michal Koutný wrote:
Hello.

On Fri, Jul 26, 2024 at 08:59:46AM GMT, Chen Ridong <chenridong@xxxxxxxxxx> wrote:
In the generate_sched_domains function, it's unnecessary to start the
second for loop with zero, which leads redundant comparisons.
Simply start with i+1, as that is sufficient.

Please see
https://lore.kernel.org/r/20240704062444.262211-1-xavier_qy@xxxxxxx

Your patch is likely obsoleted with that.

Michal

Thanks, Michal, I'm sorry I didn't notice these patches. It's a good idea to optimize with uf_node.

Thanks
Ridong