Thread (14 messages) 14 messages, 4 authors, 2018-09-23

Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2018-08-29 15:42:24
Also in: linux-arch, linux-mm, lkml

On Tue, Aug 28, 2018 at 4:20 AM Nicholas Piggin [off-list ref] wrote:
fork clears dirty/accessed bits from new ptes in the child. This logic
has existed since mapped page reclaim was done by scanning ptes when
it may have been quite important. Today with physical based pte
scanning, there is less reason to clear these bits.
Can you humor me, and make the dirty/accessed bit patches separate?

There is actually a difference wrt the dirty bit: if we unmap an area
with dirty pages, we have to do the special synchronous flush.

So a clean page in the virtual mapping is _literally_ cheaper to have.
This eliminates a major source of faults powerpc/radix requires to set
dirty/accessed bits in ptes, speeding up a fork/exit microbenchmark by
about 5% on POWER9 (16600 -> 17500 fork/execs per second).
I don't think the dirty bit matters.

The accessed bit I think may be worth keeping, so by all means remove the mkold.

                  Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help