• Paul Jackson's avatar
    [PATCH] cpuset: rebind vma mempolicies fix · 4225399a
    Paul Jackson authored
    Fix more of longstanding bug in cpuset/mempolicy interaction.
    
    NUMA mempolicies (mm/mempolicy.c) are constrained by the current tasks cpuset
    to just the Memory Nodes allowed by that cpuset.  The kernel maintains
    internal state for each mempolicy, tracking what nodes are used for the
    MPOL_INTERLEAVE, MPOL_BIND or MPOL_PREFERRED policies.
    
    When a tasks cpuset memory placement changes, whether because the cpuset
    changed, or because the task was attached to a different cpuset, then the
    tasks mempolicies have to be rebound to the new cpuset placement, so as to
    preserve the cpuset-relative numbering of the nodes in that policy.
    
    An earlier fix handled such mempolicy rebinding for mempolicies attached to a
    task.
    
    This fix rebinds mempolicies attached to vma's (address ranges in a tasks
    address space.) Due to the need to hold the task->mm->mmap_sem semaphore while
    updating vma's, the rebinding of vma mempolicies has to be done when the
    cpuset memory placement is changed,...
    4225399a
mempolicy.c 40 KB