• Paul Mackerras's avatar
    powerpc: Only demote individual slices rather than whole process · 3a8247cc
    Paul Mackerras authored
    At present, if we have a kernel with a 64kB page size, and some
    process maps something that has to be mapped with 4kB pages (such as a
    cache-inhibited mapping on POWER5+, or the eHCA infiniband queue-pair
    pages), we change the process to use 4kB pages everywhere.  This hurts
    the performance of HPC programs that access eHCA from userspace.
    
    With this patch, the kernel will only demote the slice(s) containing
    the eHCA or cache-inhibited mappings, leaving the remaining slices
    able to use 64kB hardware pages.
    
    This also changes the slice_get_unmapped_area code so that it is
    willing to place a 64k-page mapping into (or across) a 4k-page slice
    if there is no better alternative, i.e. if the program specified
    MAP_FIXED or if there is not sufficient space available in slices that
    are either empty or already have 64k-page mappings in them.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    3a8247cc
page_64.h 4.93 KB