OpenCloudOS-Kernel/arch/powerpc
Nicholas Piggin f1cb8f9beb powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_flags
The ISA suggests ptesync after setting a pte, to prevent a table walk
initiated by a subsequent access from missing that store and causing a
spurious fault. This is an architectual allowance that allows an
implementation's page table walker to be incoherent with the store
queue.

However there is no correctness problem in taking a spurious fault in
userspace -- the kernel copes with these at any time, so the updated
pte will be found eventually. Spurious kernel faults on vmap memory
must be avoided, so a ptesync is put into flush_cache_vmap.

On POWER9 so far I have not found a measurable window where this can
result in more minor faults, so as an optimisation, remove the costly
ptesync from pte updates. If an implementation benefits from ptesync,
it would be better to add it back in update_mmu_cache, so it's not
done for things like fork(2).

fork --fork --exec benchmark improved 5.2% (12400->13100).

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-06-03 20:40:36 +10:00
..
boot Merge branch 'topic/kbuild' into next 2018-06-03 20:24:15 +10:00
configs powerpc/config: powernv_defconfig updates 2018-05-10 23:25:07 +10:00
crypto crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
include powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_flags 2018-06-03 20:40:36 +10:00
kernel powerpc: use task_pid_nr() for TID allocation 2018-06-03 20:40:31 +10:00
kvm Merge branch 'topic/ppc-kvm' into next 2018-05-15 22:28:19 +10:00
lib powerpc/altivec: Add missing prototypes for altivec 2018-05-25 12:04:38 +10:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_flags 2018-06-03 20:40:36 +10:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-05 11:29:24 -08:00
oprofile powerpc: Use sizeof(*foo) rather than sizeof(struct foo) 2018-03-20 16:47:53 +11:00
perf powerpc/pmu/fsl: fix is_nmi test for irq mask change 2018-06-03 20:40:29 +10:00
platforms ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action 2018-06-03 20:40:32 +10:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysdev powerpc/xive: prepare all hcalls to support long busy delays 2018-05-10 23:25:10 +10:00
tools powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS 2018-06-01 23:08:09 +10:00
xmon powerpc/64: change softe to irqmask in show_regs and xmon 2018-06-03 20:40:30 +10:00
Kconfig powerpc/livepatch: Implement reliable stack tracing for the consistency model 2018-05-10 23:25:12 +10:00
Kconfig.debug powerpc: Add new kconfig CONFIG_PPC_IRQ_SOFT_MASK_DEBUG 2018-01-19 22:37:03 +11:00
Makefile powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS 2018-06-01 23:08:09 +10:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00