]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpuset: use Union-Find to optimize the merging of cpumasks
authorXavier <xavier_qy@163.com>
Thu, 4 Jul 2024 06:24:44 +0000 (14:24 +0800)
committerTejun Heo <tj@kernel.org>
Tue, 30 Jul 2024 23:04:50 +0000 (13:04 -1000)
commit8a895c2e6a7ed264a1b917616db205ed934e8306
treed803539395bd07d50b5b22f03f5494c302c19900
parent93c8332c8373fee415bd79f08d5ba4ba7ca5ad15
cpuset: use Union-Find to optimize the merging of cpumasks

The process of constructing scheduling domains
 involves multiple loops and repeated evaluations, leading to numerous
 redundant and ineffective assessments that impact code efficiency.

Here, we use union-find to optimize the merging of cpumasks. By employing
path compression and union by rank, we effectively reduce the number of
lookups and merge comparisons.

Signed-off-by: Xavier <xavier_qy@163.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c