powerpc/mm/slice: implement a slice mask cache
authorNicholas Piggin <npiggin@gmail.com>
Wed, 7 Mar 2018 01:37:12 +0000 (11:37 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 13 Mar 2018 12:43:06 +0000 (23:43 +1100)
commit5709f7cfd8305252dc327206bd674ad65ca4d77f
tree3bff567b21774e60411dbc9722211e121983f9c6
parent830fd2d45aa11631325404904d02c7b530d40119
powerpc/mm/slice: implement a slice mask cache

Calculating the slice mask can become a signifcant overhead for
get_unmapped_area. This patch adds a struct slice_mask for
each page size in the mm_context, and keeps these in synch with
the slices psize arrays and slb_addr_limit.

On Book3S/64 this adds 288 bytes to the mm_context_t for the
slice mask caches.

On POWER8, this increases vfork+exec+exit performance by 9.9%
and reduces time to mmap+munmap a 64kB page by 28%.

Reduces time to mmap+munmap by about 10% on 8xx.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/mmu.h
arch/powerpc/include/asm/mmu-8xx.h
arch/powerpc/mm/slice.c