diff options
author | David Rientjes <[email protected]> | 2014-01-30 15:46:08 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-01-30 16:56:56 -0800 |
commit | 8790c71a18e5d2d93532ae250bcf5eddbba729cd (patch) | |
tree | beba935c4948fc95aac45aa7729bd230ea32acc6 | |
parent | e46e33152eb82b8e2db7ffb3790a2a2653c34513 (diff) |
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 <[email protected]>
Reported-by: Robert Lippert <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: <[email protected]> [3.7+]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/mempolicy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 873de7e542bc..ae3c8f3595d4 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2930,7 +2930,7 @@ void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) unsigned short mode = MPOL_DEFAULT; unsigned short flags = 0; - if (pol && pol != &default_policy) { + if (pol && pol != &default_policy && !(pol->flags & MPOL_F_MORON)) { mode = pol->mode; flags = pol->flags; } |