Skip to content

mm/mempolicy: some fix and semantics cleanup

Feng Tang linux-mm lkml ltp oe-lkp 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesIn review 2 of 3 applied
  2. v33 patches 9 repliesSuperseded
  3. v2 posting 2/23 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v2 RFC posting 1/24 patches5 repliesSuperseded

Changes in v4 from the cover letter

* fix a problem in mpol_set_nodemask() (Michal Hocko)
* update cover-letter and commit log (Andrew/Michal)
* add Acked-by info

Patches in v4 2 of 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/mempolicy: cleanup nodemask intersection check for oominclude/linux/mempolicy.h mm/mempolicy.c mm/oom_kill.c+11 -270 repliesApplied
2/3mm/mempolicy: don't handle MPOL_LOCAL like a fake MPOL_PREFERRED policyinclude/uapi/linux/mempolicy.h mm/mempolicy.c+53 -793 replies
3/3mm/mempolicy: unify the parameter sanity check for mbind and set_mempolicymm/mempolicy.c+30 -180 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMichal Hocko
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [v4 PATCH 0/3] mm/mempolicy: some fix and semantics cleanup

Current memory policy code has some confusing and ambiguous part about MPOL_LOCAL policy, as it is handled as a faked MPOL_PREFERRED one, and there are many places having to distinguish them. Also the nodemask intersection check needs cleanup to be more explicit for OOM use, and handle MPOL_INTERLEAVE correctly. This patchset cleans up these and unifies the parameter sanity check for mbind() and set_mempolicy(), which helps to make further changes easier (notably MPOL_PREFERRED_MANY)

The patchset has been run with some sanity test like 'stress-ng' and 'ltp', and no problem found.

Thanks,
Feng

Changelogs:
v4:
* fix a problem in mpol_set_nodemask() (Michal Hocko)
* update cover-letter and commit log (Andrew/Michal)
* add Acked-by info

v3:
* fix logic of mpol_rebind_preferred() (Michal Hocko)

v2:
* rename mempolicy_nodemask_intersects() to mempolicy_in_oom_domain() and correct commit log (Michal Hocko)
* change the mpol syscall param sanity check (Michal Hocko)
* combine the 3/4 and 4/4 in v1 into one patch,
and further clean the logic (Michal Hocko)

v1:
* use helper func instead of macro for patch 2/4 (David Rientjes)
* fix a possible null pointer case in patch 3/4
* update commit log for 1/4

RFC v2:
* add for oom check fix patch 1/4
* add the unification patch for mpol preprocess 2/4

Feng Tang (3):
mm/mempolicy: cleanup nodemask intersection check for oom mm/mempolicy: don't handle MPOL_LOCAL like a fake MPOL_PREFERRED
policy
mm/mempolicy: unify the parameter sanity check for mbind and
set_mempolicy

 include/linux/mempolicy.h      |   2 +-
 include/uapi/linux/mempolicy.h |   1 -
 mm/mempolicy.c                 | 213 ++++++++++++++++++-----------------------
 mm/oom_kill.c                  |   2 +-
 4 files changed, 94 insertions(+), 124 deletions(-)
Signature · 1 line
2.7.4