From: Linus Torvalds <torvalds@transmeta.com>
To: Ben LaHaise <bcrl@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: oopses in test10-pre4 (was Re: [RFC] atomic pte updates and pae changes, take 3)
Date: Fri, 20 Oct 2000 10:18:11 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.10.10010201012330.1354-100000@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0010200046480.22300-100000@devserv.devel.redhat.com>
On Fri, 20 Oct 2000, Ben LaHaise wrote:
>
> The primary reason I added the BUG was that if this is valid, it means
> that the pte has to be removed from the page tables first with
> pte_get_and_clear since it can be modified by the other CPU. Although
> this may be safe for shm, I think it's very ugly and inconsistent. I'd
> rather make the code transfer the dirty bit to the page struct so that we
> *know* there is no information loss.
Note that we should have done this regardless of the BUG() tests: remember
the PAE case, and the fact that it was illegal to do
set_pte(page_table, swp_entry_to_pte(entry));
without having atomically cleared the pte first.
So regardless of any dirty/writable issues, that ptep_get_and_clear()
should be above the test for the PageSwapCache. Thanks for the patch.
Now, I agree 100% with you that we should _also_ make sure that we
transfer the dirty bit from the page tables to "struct page". Even if we
don't actually use that information right now. We _could_ use it: in
particular we could probably fairly easily speed up shared memory handling
by using the same kind of optimization that we do for private mappings -
using the dirty bit in the page table to determine whether we need to
write the page out again or not.
This all needs more thought, I suspect. But for now moving the
ptep_get_and_clear() up, and removing the BUG() is sufficient to get us
where we used to be.
Linus
--
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/
prev parent reply other threads:[~2000-10-20 17:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-14 0:17 [RFC] atomic pte updates and pae changes, take 2 Ben LaHaise
2000-10-14 1:43 ` Linus Torvalds
2000-10-14 8:26 ` David S. Miller
2000-10-15 12:07 ` Ingo Molnar
2000-10-14 13:33 ` Stephen Tweedie
2000-10-15 12:01 ` Ingo Molnar
2000-10-19 20:16 ` oopses in test10-pre4 (was Re: [RFC] atomic pte updates and pae changes, take 3) Linus Torvalds
2000-10-20 5:44 ` Ben LaHaise
2000-10-20 17:18 ` Linus Torvalds [this message]
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.4.10.10010201012330.1354-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.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