public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: kvm-devel@lists.sourceforge.net, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, general@lists.openfabrics.org
Subject: [ofa-general] Re: [PATCH][RFC] pte notifiers -- support for external page tables
Date: Thu, 06 Sep 2007 11:38:20 +0300	[thread overview]
Message-ID: <46DFBC7C.2020709@qumranet.com> (raw)
In-Reply-To: <1189052899.6224.5.camel@sli10-conroe.sh.intel.com>

Shaohua Li wrote:
> On Wed, 2007-09-05 at 22:32 +0300, Avi Kivity wrote:
>   
>> [resend due to bad alias expansion resulting in some recipients
>>  being bogus]
>>
>> Some hardware and software systems maintain page tables outside the normal
>> Linux page tables, which reference userspace memory.  This includes
>> Infiniband, other RDMA-capable devices, and kvm (with a pending patch).
>>
>> Because these systems maintain external page tables (and external tlbs),
>> Linux cannot demand page this memory and it must be locked.  For kvm at
>> least, this is a significant reduction in functionality.
>>
>> This sample patch adds a new mechanism, pte notifiers, that allows drivers
>> to register an interest in a changes to ptes. Whenever Linux changes a
>> pte, it will call a notifier to allow the driver to adjust the external
>> page table and flush its tlb.
>>
>> Note that only one notifier is implemented, ->clear(), but others should be
>> similar.
>>
>> pte notifiers are different from paravirt_ops: they extend the normal
>> page tables rather than replace them; and they provide high-level
>> information
>> such as the vma and the virtual address for the driver to use.
>>     
> Looks great. So for kvm, all guest pages will be vma mapped?
> There are lock issues in kvm between kvm lock and page lock. 
>   

Yes, locking will be a headache.

> Will shadow page table be still stored in page->private? If yes, the
> page->private must be cleaned before add_to_swap.
>   

page->private can be in use by filesystems, so we will need to move rmap 
somewhere else.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.

  reply	other threads:[~2007-09-06  8:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 19:32 [PATCH][RFC] pte notifiers -- support for external page tables Avi Kivity
2007-09-05 19:56 ` [ofa-general] Re: [kvm-devel] " Rusty Russell
     [not found]   ` <1189022183.10802.184.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-09-05 20:17     ` Avi Kivity
     [not found] ` <11890207643068-git-send-email-avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-06  4:28   ` Shaohua Li
2007-09-06  8:38     ` Avi Kivity [this message]
     [not found] ` <p73myw09g5w.fsf@bingen.suse.de>
2007-09-06 15:17   ` [ofa-general] " Avi Kivity
     [not found] <11890103283456-git-send-email-avi@qumranet.com>
     [not found] ` <46DEFDF4.5000900@redhat.com>
     [not found]   ` <46DF0013.4060804@qumranet.com>
     [not found]     ` <46DF0234.7090504@redhat.com>
2007-09-05 19:32       ` [ofa-general] Re: [PATCH][RFC]: " Avi Kivity
     [not found] ` <20070905204012.GA29272@sgi.com>
2007-09-05 20:42   ` Avi Kivity

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=46DFBC7C.2020709@qumranet.com \
    --to=avi@qumranet.com \
    --cc=general@lists.openfabrics.org \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shaohua.li@intel.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