From: "Benjamin C.R. LaHaise" <blah@kvack.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: tytso@mit.edu, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC] atomic pte updates for x86 smp
Date: Thu, 12 Oct 2000 00:03:31 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.3.96.1001011232450.23223A-100000@kanga.kvack.org> (raw)
In-Reply-To: <Pine.LNX.4.10.10010111702001.2444-100000@penguin.transmeta.com>
Hello Linus,
On Wed, 11 Oct 2000, Linus Torvalds wrote:
> I much prefered the dirty fault version.
> What does "quite noticeable" mean? Does it mean that you can see page
> faults (no big deal), or does it mean that you can actually measure the
> performance degradation objectively?
It's a factor of 4 difference in execution time on the filemap rewrite
test on a 1GB file (including all those cache misses that should have
dwarfed the page fault handler). Moving the writable test and mkdirty
early on in the page fault handler made no measurable difference in
execution time; the bulk of the overhead appears to be in handling the
page fault itself.
> Also, this version doesn't seem to fix the bug.
...
> Both of the above paths can cause the dirty bit to be dropped again, as
> far as I can see.
Note the fragment above those portions of the patch where the
pte_xchg_clear is done on the page table: this results in a page fault
for any other cpu that looks at the pte while it is unavailable.
> In fact, you seem to have _added_ those drops in this patch. What's up?
It's safe because of how x86s hardware works when it encounters the
cleared pte. According to one of the manuals I've got here (the old 386
book is the only one that states it outright, sigh), the access and dirty
bits are updated with a locked memory cycle only if the entry is marked
present. If you want test code demonstrating that x86 does a reread of
the pte on a dirty fault, I'll gladly share it.
> I'm not going to apply a patch that I don't see will even fix the problem
> at this point.
>
> I _will_ apply the "exception on dirty" version, if you remove the SMP
> special case (ie you do it unconditionally). At least that one I believe
> really fixes the problem.
I'd rather not lose the use of a hardware feature that makes a difference
during the most important time: when the system is under heavy load and
the page table scanner is active. If there's a way the atomic updates can
be cleaned up acceptably, then I want to do so. Cheers,
-ben
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-10-12 4:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200010090419.e994JQT09775@trampoline.thunk.org>
2000-10-10 20:53 ` Updated 2.4 TODO List Rik van Riel
2000-10-11 0:06 ` 2.4.0test9 vm: disappointing streaming i/o under load Chris Evans
2000-10-11 11:38 ` Eric Lowe
2000-10-11 20:59 ` Chris Evans
2000-10-11 22:10 ` Roger Larsson
2000-10-11 22:46 ` Chris Evans
2000-10-13 16:57 ` Rik van Riel
2000-10-11 18:38 ` Updated 2.4 TODO List tytso
2000-10-11 23:52 ` [RFC] atomic pte updates for x86 smp Ben LaHaise
2000-10-12 0:09 ` Linus Torvalds
2000-10-12 4:03 ` Benjamin C.R. LaHaise [this message]
2000-10-12 4:06 ` David S. Miller
2000-10-12 4:31 ` Cort Dougan
2000-10-12 4:37 ` Benjamin C.R. LaHaise
2000-10-12 6:42 ` Linus Torvalds
2000-10-12 8:13 ` Ingo Molnar
2000-10-12 8:56 ` David S. Miller
2000-10-12 10:05 ` Ingo Molnar
2000-10-12 11:10 ` Ingo Molnar
2000-10-12 15:10 ` Benjamin C.R. LaHaise
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=Pine.LNX.3.96.1001011232450.23223A-100000@kanga.kvack.org \
--to=blah@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.com \
--cc=tytso@mit.edu \
/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