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>
这个提交包含在:
@@ -93,13 +93,6 @@ static int hash__init_new_context(struct mm_struct *mm)
|
||||
if (index < 0)
|
||||
return index;
|
||||
|
||||
/*
|
||||
* In the case of exec, use the default limit,
|
||||
* otherwise inherit it from the mm we are duplicating.
|
||||
*/
|
||||
if (!mm->context.slb_addr_limit)
|
||||
mm->context.slb_addr_limit = DEFAULT_MAP_WINDOW_USER64;
|
||||
|
||||
/*
|
||||
* The old code would re-promote on fork, we don't do that when using
|
||||
* slices as it could cause problem promoting slices that have been
|
||||
@@ -115,7 +108,7 @@ static int hash__init_new_context(struct mm_struct *mm)
|
||||
* check against 0 is OK.
|
||||
*/
|
||||
if (mm->context.id == 0)
|
||||
slice_set_user_psize(mm, mmu_virtual_psize);
|
||||
slice_init_new_context_exec(mm);
|
||||
|
||||
subpage_prot_init_new_context(mm);
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户