Thread (15 messages) 15 messages, 4 authors, 2010-07-02

Re: [PATCH 0/2] Faster MMU lookups for Book3s v3

From: Avi Kivity <hidden>
Date: 2010-07-01 11:14:56
Also in: kvm

On 07/01/2010 01:00 PM, Alexander Graf wrote:
But doesn't that mean that you still need to loop through all the hvas
that you want to invalidate?
It does.
  Wouldn't it speed up dirty bitmap flushing
a lot if we'd just have a simple linked list of all sPTEs belonging to
that memslot?
   
The complexity is O(pages_in_slot) + O(sptes_for_slot).

Usually, every page is mapped at least once, so sptes_for_slot 
dominates.  Even when it isn't so, iterating the rmap base pointers is 
very fast since they are linear in memory, while sptes are scattered 
around, causing cache misses.

Another consideration is that on x86, an spte occupies just 64 bits (for 
the hardware pte); if there are multiple sptes per page (rare on modern 
hardware), there is also extra memory for rmap chains; sometimes we also 
allocate 64 bits for the gfn.  Having an extra linked list would require 
more memory to be allocated and maintained.

-- 
error compiling committee.c: too many arguments to function
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help