mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
powerpc/mm: Only call store_updates_sp() on stores in do_page_fault()
Function store_updates_sp() checks whether the faulting
instruction is a store updating r1. Therefore we can limit its calls
to store exceptions.
This patch is an improvement of commit a7a9dcd882
("powerpc: Avoid
taking a data miss on every userspace instruction miss")
With the same microbenchmark app, run with 500 as argument, on an
MPC885 we get:
Before this patch: 152000 DTLB misses
After this patch: 147000 DTLB misses
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
9affa9e228
commit
e8de85ca32
@ -287,7 +287,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
|
||||
* can result in fault, which will cause a deadlock when called with
|
||||
* mmap_sem held
|
||||
*/
|
||||
if (!is_exec && user_mode(regs))
|
||||
if (is_write && user_mode(regs))
|
||||
store_update_sp = store_updates_sp(regs);
|
||||
|
||||
if (user_mode(regs))
|
||||
|
Loading…
Reference in New Issue
Block a user