• Waiman Long's avatar
    cpuset: Track cpusets that use parent's effective_cpus · 4716909c
    Waiman Long authored
    In the default hierarchy, a cpuset will use the parent's effective_cpus
    if none of the requested CPUs can be granted from the parent. That can
    be a problem if a parent is a partition root with children partition
    roots. Changes to a parent's effective_cpus list due to changes in a
    child partition root may not be properly reflected in a child cpuset
    that use parent's effective_cpus because the cpu_exclusive rule of a
    partition root will not guard against that.
    
    In order to avoid the mismatch, two new tracking variables are added to
    the cpuset structure to track if a cpuset uses parent's effective_cpus
    and the number of children cpusets that use its effective_cpus. So
    whenever cpumask changes are made to a parent, it will also check to
    see if it has other children cpusets that use its effective_cpus and
    call update_cpumasks_hier() if that is the case.
    Signed-off-by: default avatarWaiman Long <longman@redhat.com>
    Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    4716909c
cpuset.c 93.8 KB