]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory.c: Update local TLB if PTE entry exists
authorBibo Mao <maobibo@loongson.cn>
Wed, 27 May 2020 02:25:18 +0000 (10:25 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 27 May 2020 11:06:09 +0000 (13:06 +0200)
commitb797c6a08afd4b2d489461c1418d88c2df2ed598
treed8f0fc569f5d1f3003d35dd9788ab58bb8380553
parent8419a7c4f0db6ddb6a68503f6b65e06e2514d0c1
mm/memory.c: Update local TLB if PTE entry exists

If two threads concurrently fault at the same page, the thread that
won the race updates the PTE and its local TLB. For now, the other
thread gives up, simply does nothing, and continues.

It could happen that this second thread triggers another fault, whereby
it only updates its local TLB while handling the fault. Instead of
triggering another fault, let's directly update the local TLB of the
second thread. Function update_mmu_tlb is used here to update local
TLB on the second thread, and it is defined as empty on other arches.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/pgtable.h
include/asm-generic/pgtable.h
mm/memory.c