• Xavier's avatar
    cpuset: use Union-Find to optimize the merging of cpumasks · 8a895c2e
    Xavier authored
    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>
    8a895c2e
cpuset.c 142 KB