virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* pte_offset_map + lazy mmu
@ 2007-03-10  6:37 Jeremy Fitzhardinge
  2007-03-10  6:54 ` Zachary Amsden
  2007-03-10  7:26 ` Zachary Amsden
  0 siblings, 2 replies; 4+ messages in thread
From: Jeremy Fitzhardinge @ 2007-03-10  6:37 UTC (permalink / raw)
  To: Zachary Amsden; +Cc: Chris Wright, Virtualization Mailing List

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?

    J

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-10 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).