• Pavel Tatashin's avatar
    mm: honor PF_MEMALLOC_PIN for all movable pages · 8e3560d9
    Pavel Tatashin authored
    PF_MEMALLOC_PIN is only honored for CMA pages, extend this flag to work
    for any allocations from ZONE_MOVABLE by removing __GFP_MOVABLE from
    gfp_mask when this flag is passed in the current context.
    
    Add is_pinnable_page() to return true if page is in a pinnable page.  A
    pinnable page is not in ZONE_MOVABLE and not of MIGRATE_CMA type.
    
    Link: https://lkml.kernel.org/r/20210215161349.246722-8-pasha.tatashin@soleen.comSigned-off-by: default avatarPavel Tatashin <pasha.tatashin@soleen.com>
    Acked-by: default avatarMichal Hocko <mhocko@suse.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Ira Weiny <ira.weiny@intel.com>
    Cc: James Morris <jmorris@namei.org>
    Cc: Jason Gunthorpe <jgg@nvidia.com>
    Cc: Jason Gunthorpe <jgg@ziepe.ca>
    Cc: John Hubbard <jhubbard@nvidia.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Oscar Salvador <osalvador@suse.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Sasha Levin <sashal@kernel.org>
    Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Cc: Tyler Hicks <tyhicks@linux.microsoft.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    8e3560d9
page_alloc.c 255 KB