From: Jeff Dike <jdike@addtoit.com>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [patch 1/3] uml: share page bits handling between 2 and 3 level pagetables
Date: Fri, 12 Aug 2005 13:05:14 -0400 [thread overview]
Message-ID: <20050812170514.GB7448@ccure.user-mode-linux.org> (raw)
In-Reply-To: <200508102137.28414.blaisorblade@yahoo.it>
On Wed, Aug 10, 2005 at 09:37:28PM +0200, Blaisorblade wrote:
> Just noticed: you can drop them (except the first, which is a nice cleanup).
>
> set_pte handles that, and include/asm-generic/pgtable.h uses coherently
> set_pte_at. I've checked UML by examining "grep pte", and either mk_pte or
> set_pte are used.
>
> Exceptions: fixaddr_user_init (but that should be ok as we shouldn't map it
> actually), pte_modify() (which handles that only for present pages).
>
> But pte_modify is used with set_pte, so probably we could as well drop that
> handling.
>
> Also look, on the "set_pte" theme, at the attached patch. I realized this when
> I needed those lines to work - I was getting a segfault loop.
OK, this sounds right. To recap, we were concerned that when the page
scanner went around clearing dirty (accessed) bits, that
fix_range_common wasn't write (read) protecting the page in order to
emulate the cleared bits.
However, set_pte does set _PAGE_NEWPAGE, which forces the page through
a full update, including dirty/accessed bit emulation.
Correct?
However, I did add some parenthesis to your patch:
WARN_ON(!pte_young(*pte) || (pte_write(*pte) && !pte_dirty(*pte)));
This seems clearer to me.
So, your pte consolidation patch is still in my tree, the other two
pte patches are dropped.
> After using set_pte(), things worked. I have now an almost perfectly working
> implementation of remap_file_pages with protection support.
> There will probably be some other things to update, like swapping locations,
> but I can't get this kernel to fail (it's easier to find bugs in the
> test-program, it grew quite complex).
Excellent.
> I'm going to clean up the code and write changelogs, to send then the patches
> for -mm (hoping the page fault scalability patches don't get in the
> way).
Good.
Jeff
next prev parent reply other threads:[~2005-08-12 17:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 18:56 [patch 1/3] uml: share page bits handling between 2 and 3 level pagetables blaisorblade
2005-07-30 16:02 ` Jeff Dike
2005-07-30 18:54 ` Blaisorblade
2005-08-10 19:37 ` Blaisorblade
2005-08-12 17:05 ` Jeff Dike [this message]
2005-09-02 20:17 ` Jeff Dike
2005-09-03 5:08 ` Hugh Dickins
2005-09-04 11:33 ` [uml-devel] " Blaisorblade
2005-08-12 18:37 ` Blaisorblade
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=20050812170514.GB7448@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=blaisorblade@yahoo.it \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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