Commit 8a895c2e authored by Xavier's avatar Xavier Committed by Tejun Heo
Browse files

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: default avatarXavier <xavier_qy@163.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 93c8332c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment