diff options
author | Vlastimil Babka <vbabka@suse.cz> | 2016-03-15 17:55:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 19:55:16 -0400 |
commit | 1f7866b4aebd19e2525775083279e171b36783a4 (patch) | |
tree | 9c4ba6b82620639e0f529d6be199675384b4273f /include/linux/gfp.h | |
parent | 20f6e03a40ba536dfc7c6f83dd894d994aeb39f3 (diff) |
mm, tracing: make show_gfp_flags() up to date
The show_gfp_flags() macro provides human-friendly printing of gfp flags
in tracepoints. However, it is somewhat out of date and missing several
flags. This patches fills in the missing flags, and distinguishes
properly between GFP_ATOMIC and __GFP_ATOMIC which were both translated
to "GFP_ATOMIC". More generally, all __GFP_X flags which were
previously printed as GFP_X, are now printed as __GFP_X, since ommiting
the underscores results in output that doesn't actually match the source
code, and can only lead to confusion. Where both variants are defined
equal (e.g. _DMA and _DMA32), the variant without underscores are
preferred.
Also add a note in gfp.h so hopefully future changes will be synced
better.
__GFP_MOVABLE is defined twice in include/linux/gfp.h with different
comments. Leave just the newer one, which was intended to replace the
old one.
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Michal Hocko <mhocko@suse.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r-- | include/linux/gfp.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index af1f2b24bbe4..bbe5e7fae337 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -9,6 +9,11 @@ | |||
9 | 9 | ||
10 | struct vm_area_struct; | 10 | struct vm_area_struct; |
11 | 11 | ||
12 | /* | ||
13 | * In case of changes, please don't forget to update | ||
14 | * include/trace/events/gfpflags.h | ||
15 | */ | ||
16 | |||
12 | /* Plain integer GFP bitmasks. Do not use this directly. */ | 17 | /* Plain integer GFP bitmasks. Do not use this directly. */ |
13 | #define ___GFP_DMA 0x01u | 18 | #define ___GFP_DMA 0x01u |
14 | #define ___GFP_HIGHMEM 0x02u | 19 | #define ___GFP_HIGHMEM 0x02u |
@@ -48,7 +53,6 @@ struct vm_area_struct; | |||
48 | #define __GFP_DMA ((__force gfp_t)___GFP_DMA) | 53 | #define __GFP_DMA ((__force gfp_t)___GFP_DMA) |
49 | #define __GFP_HIGHMEM ((__force gfp_t)___GFP_HIGHMEM) | 54 | #define __GFP_HIGHMEM ((__force gfp_t)___GFP_HIGHMEM) |
50 | #define __GFP_DMA32 ((__force gfp_t)___GFP_DMA32) | 55 | #define __GFP_DMA32 ((__force gfp_t)___GFP_DMA32) |
51 | #define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* Page is movable */ | ||
52 | #define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */ | 56 | #define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */ |
53 | #define GFP_ZONEMASK (__GFP_DMA|__GFP_HIGHMEM|__GFP_DMA32|__GFP_MOVABLE) | 57 | #define GFP_ZONEMASK (__GFP_DMA|__GFP_HIGHMEM|__GFP_DMA32|__GFP_MOVABLE) |
54 | 58 | ||