diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-03-07 11:37:09 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-03-13 23:43:05 +1100 |
commit | 1753dd1830367709144f68f539554dadd7a7ccba (patch) | |
tree | c77fbae605bafdcc4031b8e54327a02473f1b719 /arch/powerpc/mm/mmu_context_nohash.c | |
parent | ab83dc794c9d8870e4844cca9a2945b782b8ee7e (diff) | |
download | linux-stable-1753dd1830367709144f68f539554dadd7a7ccba.tar.gz linux-stable-1753dd1830367709144f68f539554dadd7a7ccba.tar.bz2 linux-stable-1753dd1830367709144f68f539554dadd7a7ccba.zip |
powerpc/mm/slice: Simplify and optimise slice context initialisation
The slice state of an mm gets zeroed then initialised upon exec.
This is the only caller of slice_set_user_psize now, so that can be
removed and instead implement a faster and simplified approach that
requires no locking or checking existing state.
This speeds up vfork+exec+exit performance on POWER8 by 3%.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/mmu_context_nohash.c')
-rw-r--r-- | arch/powerpc/mm/mmu_context_nohash.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index d98f7e5c141b..be8f5c9d4d08 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c @@ -332,9 +332,6 @@ int init_new_context(struct task_struct *t, struct mm_struct *mm) pr_hard("initing context for mm @%p\n", mm); #ifdef CONFIG_PPC_MM_SLICES - if (!mm->context.slb_addr_limit) - mm->context.slb_addr_limit = DEFAULT_MAP_WINDOW; - /* * We have MMU_NO_CONTEXT set to be ~0. Hence check * explicitly against context.id == 0. This ensures that we properly @@ -343,7 +340,7 @@ int init_new_context(struct task_struct *t, struct mm_struct *mm) * will have id != 0). */ if (mm->context.id == 0) - slice_set_user_psize(mm, mmu_virtual_psize); + slice_init_new_context_exec(mm); #endif mm->context.id = MMU_NO_CONTEXT; mm->context.active = 0; |