um: Avoid marking pages with "changed protection"
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>
Wed, 5 Dec 2018 12:37:41 +0000 (12:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:08 +0000 (19:46 +0100)
commite8f13f32f436e3fae2b43a433ec5c677e0e2f5f9
treeba86e5331ec972df6442aed95d516d12e5aac188
parent254c1913cb652d4227fcff87d3518a22e9001062
um: Avoid marking pages with "changed protection"

[ Upstream commit 8892d8545f2d0342b9c550defbfb165db237044b ]

Changing protection is a very high cost operation in UML
because in addition to an extra syscall it also interrupts
mmap merge sequences generated by the tlb.

While the condition is not particularly common it is worth
avoiding.

Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/um/include/asm/pgtable.h