• L
    mm: add new 'read_cache_page_gfp()' helper function · 0531b2aa
    Linus Torvalds 提交于
    It's a simplified 'read_cache_page()' which takes a page allocation
    flag, so that different paths can control how aggressive the memory
    allocations are that populate a address space.
    
    In particular, the intel GPU object mapping code wants to be able to do
    a certain amount of own internal memory management by automatically
    shrinking the address space when memory starts getting tight.  This
    allows it to dynamically use different memory allocation policies on a
    per-allocation basis, rather than depend on the (static) address space
    gfp policy.
    
    The actual new function is a one-liner, but re-organizing the helper
    functions to the point where you can do this with a single line of code
    is what most of the patch is all about.
    Tested-by: NChris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    0531b2aa
pagemap.h 13.1 KB