• Nicholas Piggin's avatar
    powerpc/mm/slice: pass pointers to struct slice_mask where possible · 830fd2d4
    Nicholas Piggin authored
    Pass around const pointers to struct slice_mask where possible, rather
    than copies of slice_mask, to reduce stack and call overhead.
    
    checkstack.pl gives, before:
    0x00000d1c slice_get_unmapped_area [slice.o]:		592
    0x00001864 is_hugepage_only_range [slice.o]:		448
    0x00000754 slice_find_area_topdown [slice.o]:		400
    0x00000484 slice_find_area_bottomup.isra.1 [slice.o]:	272
    0x000017b4 slice_set_range_psize [slice.o]:		224
    0x00000a4c slice_find_area [slice.o]:			128
    0x00000160 slice_check_fit [slice.o]:			112
    
    after:
    0x00000ad0 slice_get_unmapped_area [slice.o]:		448
    0x00001464 is_hugepage_only_range [slice.o]:		288
    0x000006c0 slice_find_area [slice.o]:			144
    0x0000016c slice_check_fit [slice.o]:			128
    0x00000528 slice_find_area_bottomup.isra.2 [slice.o]:	128
    0x000013e4 slice_set_range_psize [slice.o]:		128
    
    This increases vfork+exec+exit performance by 1.5%.
    
    Reduces time to mmap+munmap a 64kB page by 17%.
    Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    830fd2d4
slice.c 21 KB