diff options
| author | Vlastimil Babka <[email protected]> | 2017-07-06 15:39:59 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2017-07-06 16:24:34 -0700 |
| commit | 45816682b2cd6771cf63cb7dc7dbebdd827a0132 (patch) | |
| tree | 09c1c5ee154b91bfe85780b4e6d771fd305c36e2 /net/lapb/lapb_subr.c | |
| parent | 902b62810a57ba75422f509afaf30e876e2aadfd (diff) | |
mm, mempolicy: stop adjusting current->il_next in mpol_rebind_nodemask()
The task->il_next variable stores the next allocation node id for task's
MPOL_INTERLEAVE policy. mpol_rebind_nodemask() updates interleave and
bind mempolicies due to changing cpuset mems. Currently it also tries
to make sure that current->il_next is valid within the updated nodemask.
This is bogus, because 1) we are updating potentially any task's
mempolicy, not just current, and 2) we might be updating a per-vma
mempolicy, not task one.
The interleave_nodes() function that uses il_next can cope fine with the
value not being within the currently allowed nodes, so this hasn't
manifested as an actual issue.
We can remove the need for updating il_next completely by changing it to
il_prev and store the node id of the previous interleave allocation
instead of the next id. Then interleave_nodes() can calculate the next
id using the current nodemask and also store it as il_prev, except when
querying the next node via do_get_mempolicy().
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Vlastimil Babka <[email protected]>
Reviewed-by: Christoph Lameter <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Dimitri Sivanich <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions