From: Linus Torvalds <torvalds@linux-foundation.org>
To: Nick Piggin <npiggin@gmail.com>
Cc: linux-mm <linux-mm@kvack.org>,
linux-arch <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ppc-dev <linuxppc-dev@lists.ozlabs.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork
Date: Wed, 29 Aug 2018 08:42:09 -0700 [thread overview]
Message-ID: <CA+55aFwbZrsdZEh0ds1W3AWUeTamDRheQPKSi9O=--cEOSjr5g@mail.gmail.com> (raw)
In-Reply-To: <20180828112034.30875-3-npiggin@gmail.com>
On Tue, Aug 28, 2018 at 4:20 AM Nicholas Piggin <npiggin@gmail.com> 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
next prev parent reply other threads:[~2018-08-29 15:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 11:20 [PATCH 0/3] mm: dirty/accessed pte optimisations Nicholas Piggin
2018-08-28 11:20 ` [PATCH 1/3] mm/cow: don't bother write protectig already write-protected huge pages Nicholas Piggin
2018-08-28 11:20 ` [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork Nicholas Piggin
2018-08-29 15:42 ` Linus Torvalds [this message]
2018-08-29 23:12 ` Nicholas Piggin
2018-08-29 23:15 ` Linus Torvalds
2018-08-29 23:57 ` Nicholas Piggin
2018-08-28 11:20 ` [PATCH 3/3] mm: optimise pte dirty/accessed bit setting by demand based pte insertion Nicholas Piggin
2018-09-05 14:29 ` Guenter Roeck
2018-09-05 22:18 ` Nicholas Piggin
2018-09-06 0:36 ` Guenter Roeck
2018-09-17 17:53 ` Nicholas Piggin
2018-09-21 8:42 ` Ley Foon Tan
2018-09-23 9:23 ` Nicholas Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+55aFwbZrsdZEh0ds1W3AWUeTamDRheQPKSi9O=--cEOSjr5g@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox