From: "Ross Biro" <rossb@google.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC/PATH 1/2] MM: Make Page Tables Relocatable -- conditional flush
Date: Wed, 30 Apr 2008 18:15:40 -0400 [thread overview]
Message-ID: <d43160c70804301515i7e02a3d5ha3b84d4b26ae68bd@mail.gmail.com> (raw)
In-Reply-To: <4818CEDA.8000908@goop.org>
On Wed, Apr 30, 2008 at 3:56 PM, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>>> - How does it deal with migrating the accessed/dirty bits in ptes if
>>> cpus can be using old versions of the pte for a while after the
>>> copy? Losing dirty updates can lose data, so explicitly addressing
>>> this point in code and/or comments is important.
>>>
>>
>> It doesn't currently. Although it's easy to fix. Just before the
>> free, we just have to copy the dirty bits again. Slow, but not in a
>> critical path.
>>
>
> But the issue I'm concerned about is what happens if a process writes the
> page, causing its cpu to mark the (old, in-limbo) pte dirty. Meanwhile
> someone else is scanning the pagetables looking for things to evict. It
> check the (shiny new) pte, finds it not dirty, and decides to evict the
> apparently clean page.
>
> What, for that matter, stops a page from being evicted from under a limboed
> mapping? Does it get accounted for (I guess the existing tlb flushing
> should be sufficient to keep it under control).
The delimbo functions can be extended to deal with the dirty bit.
They already have to be called to make sure the cpu is looking at the
proper page flags. The easiest solution to the races is probably to
make the delimbo pte functions flush the tlb cache to make sure the
cpu will also be looking at the correct entry to update flags.
Otherwise the atomic ptep* functions would probably need to be
modified.
Ross
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2008-04-30 22:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 13:42 Ross Biro
2008-04-30 17:54 ` Jeremy Fitzhardinge
2008-04-30 18:40 ` Ross Biro
2008-04-30 19:56 ` Jeremy Fitzhardinge
2008-04-30 22:15 ` Ross Biro [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=d43160c70804301515i7e02a3d5ha3b84d4b26ae68bd@mail.gmail.com \
--to=rossb@google.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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