virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>,
	Virtualization Mailing List <virtualization@lists.osdl.org>
Subject: Re: pte_offset_map + lazy mmu
Date: Fri, 09 Mar 2007 23:26:08 -0800	[thread overview]
Message-ID: <45F25D90.4040100@vmware.com> (raw)
In-Reply-To: <45F2521E.1000807@goop.org>

Jeremy Fitzhardinge wrote:
> Is pte_offset_map allowed to happen within lazy mmu?  I presume not,
> because you definitely don't want the mapping pte update to be deferred.
>
> Or, more specifically, is kunmap_atomic ever allowed within lazy mmu? 
> I'm looking at kpte_clear_flush; I've already got a patch which turns
> this into a pv_op, along with a Xen implementation.  But I think its
> probably an excess pv_op for a relatively minor corner case.  It seems
> to me that it would be better to define kpte_clear_flush as:
>
>     #define kpte_clear_flush(ptep, vaddr)					\
>     do {									\
>     	arch_enter_lazy_mmu_mode();					\
>     	pte_clear(&init_mm, vaddr, ptep);				\
>     	__flush_tlb_one(vaddr);						\
>     	arch_leave_lazy_mmu_mode();					\
>     } while (0)
>       
>
> and take advantage of mmu batching to make this operation efficient. 
> But I'm not sure if this is safe.
>
> (Also, kmap_atomic could use set_pte_at rather than set_pte.)
>
> What do you think?
>   

I'm sorry, I was broken.  This does work for us, as the batching is not 
nested (as you point out, that would be a bug).  I already took care to 
make sure that all the arch_enter_lazy_mmu_mode() hooks in mm code 
happen after the pagetables are mapped.

Still, I think the hint based solution allows for expansion of the 
capabilities without requiring new paravirt-ops.  What do you think 
about my proposal?

Zach

      parent reply	other threads:[~2007-03-10  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-10  6:37 pte_offset_map + lazy mmu Jeremy Fitzhardinge
2007-03-10  6:54 ` Zachary Amsden
2007-03-10 16:06   ` Jeremy Fitzhardinge
2007-03-10  7:26 ` Zachary Amsden [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=45F25D90.4040100@vmware.com \
    --to=zach@vmware.com \
    --cc=chrisw@sous-sol.org \
    --cc=jeremy@goop.org \
    --cc=virtualization@lists.osdl.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;
as well as URLs for NNTP newsgroup(s).