Skip to content
  • Vlastimil Babka's avatar
    mm, tracing: make show_gfp_flags() up to date · 1f7866b4
    Vlastimil Babka authored
    
    
    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: default avatarVlastimil Babka <vbabka@suse.cz>
    Reviewed-by: default avatarMichal Hocko <mhocko@suse.com>
    Acked-by: default avatarDavid 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    1f7866b4