From: Andrea Arcangeli <andrea@qumranet.com>
To: Rik van Riel <riel@redhat.com>
Cc: Izik Eidus <izike@qumranet.com>,
kvm-devel <kvm-devel@lists.sourceforge.net>,
avi@qumranet.com, dor.laor@qumranet.com, linux-mm@kvack.org,
yaniv@qumranet.com
Subject: Re: [kvm-devel] [RFC][PATCH 0/5] Memory merging driver for Linux
Date: Wed, 23 Jan 2008 18:54:44 +0100 [thread overview]
Message-ID: <20080123175444.GH7141@v2.random> (raw)
In-Reply-To: <20080123120510.4014e382@bree.surriel.com>
On Wed, Jan 23, 2008 at 12:05:10PM -0500, Rik van Riel wrote:
> On Mon, 21 Jan 2008 18:05:53 +0200
> Izik Eidus <izike@qumranet.com> wrote:
>
> > i added 2 new functions to the kernel
> > one:
> > page_wrprotect() make the page as read only by setting the ptes point to
> > it as read only.
> > second:
> > replace_page() - replace the pte mapping related to vm area between two
> > pages
>
> How will this work on CPUs with nested paging support, where the
> CPU does the guest -> physical address translation? (opposed to
> having shadow page tables)
sptes resolve guest addresses to host physical addresses (what is
different is only which kind of guest address is being translated).
sptes are faster than nptes for non pte-mangling non-context-switching
memory intensive number crunching workloads infact. (DBMS will
appreciate ntpes instead ;)
> Is it sufficient to mark the page read-only in the guest->physical
> translation page table?
Yes, just like with sptes too. I guess ntpes will also be managed as a
tlb even if they won't require many changes, but the mmu notifier
already firing in those two calls is what will keep both sptes and
nptes in sync with the main linux VM. The serialization against
get_user_pages that refills the spte/npte layer with
nonpresent-nofault case of course happens through the PT lock, just
like for the regular linux page fault against the pte that is pte_none
for a little while but with the lock held (and set to write protect or
new value before releasing it). This infact shows how the mmu
notifiers that connects the linux pte to the spte/npte works for more
than swapping.
--
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>
next prev parent reply other threads:[~2008-01-23 17:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 16:05 Izik Eidus
2008-01-23 17:05 ` [kvm-devel] " Rik van Riel
2008-01-23 17:54 ` Andrea Arcangeli [this message]
2008-01-23 18:11 ` Izik Eidus
2008-01-24 5:38 ` Avi Kivity
2008-01-23 23:10 ` Chris Wright
2008-01-24 5:40 ` Avi Kivity
2008-01-24 9:26 ` Izik Eidus
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=20080123175444.GH7141@v2.random \
--to=andrea@qumranet.com \
--cc=avi@qumranet.com \
--cc=dor.laor@qumranet.com \
--cc=izike@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
--cc=yaniv@qumranet.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