Commit 8790c71a18e5d2d93532ae250bcf5eddbba729cd
Committed by
Linus Torvalds
1 parent
e46e33152e
Exists in
master
and in
16 other branches
mm/mempolicy.c: fix mempolicy printing in numa_maps
As a result of commit 5606e3877ad8 ("mm: numa: Migrate on reference policy"), /proc/<pid>/numa_maps prints the mempolicy for any <pid> as "prefer:N" for the local node, N, of the process reading the file. This should only be printed when the mempolicy of <pid> is MPOL_PREFERRED for node N. If the process is actually only using the default mempolicy for local node allocation, make sure "default" is printed as expected. Signed-off-by: David Rientjes <rientjes@google.com> Reported-by: Robert Lippert <rlippert@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Acked-by: Mel Gorman <mgorman@suse.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: <stable@vger.kernel.org> [3.7+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
mm/mempolicy.c
... | ... | @@ -2930,7 +2930,7 @@ |
2930 | 2930 | unsigned short mode = MPOL_DEFAULT; |
2931 | 2931 | unsigned short flags = 0; |
2932 | 2932 | |
2933 | - if (pol && pol != &default_policy) { | |
2933 | + if (pol && pol != &default_policy && !(pol->flags & MPOL_F_MORON)) { | |
2934 | 2934 | mode = pol->mode; |
2935 | 2935 | flags = pol->flags; |
2936 | 2936 | } |