lkml.org 
[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kvm: remove in_range from kvm_io_device
On Tue, Jun 23, 2009 at 11:44:57AM -0400, Gregory Haskins wrote:
> >> This proposed approach forces us into a
> >> potential O(256) algorithm in the hotpath (all MMIO/PIO exits will hit
> >> this, not just in-kernel users). How would you address this?
> >>
> >
> > Two ideas that come to mind:
> > - add addr/len fields to devices, use these to speed up lookup
> >
>
> Yep, thats what I was thinking as well. We can have the top-level
> (group) be an rbtree on addr/len, and then walk the list of items at
> that address linearly using your read/write() approach.
>
>
> > - add a small cache that can be scanned first
> >
>
> Yep, I think we may want to do this anyway independent of the search alg.
>
> > In both cases, you first do a fast lookup, ask the device whether
> > it wants the transaction, then resort to linear scan if not
> >
>
> -Greg
>

Looks like we have a concensus then.

--
MST


\
 
 \ /
  Last update: 2009-06-23 18:01    [W:0.050 / U:30.220 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site