qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 4/4] intel_iommu: implement mru list for iotl


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH v3 4/4] intel_iommu: implement mru list for iotlb
Date: Fri, 14 Jul 2017 12:32:41 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, Jul 13, 2017 at 04:48:42PM +0800, Jason Wang wrote:
> 
> 
> On 2017年07月12日 16:13, Peter Xu wrote:
> >It is not wise to disgard all the IOTLB cache when cache size reaches
> >max, but that's what we do now. A slightly better (but still simple) way
> >to do this is, we just throw away the least recent used cache entry.
> >
> >This patch implemented MRU list algorithm for VT-d IOTLB. The main logic
> >is to maintain a Most Recently Used list for the IOTLB entries. The hash
> >table is still used for lookup, though a new list field is added to each
> >IOTLB entry for a iotlb MRU list. For each active IOTLB entry, it's both
> >in the hash table in s->iotlb, and also linked into the MRU list of
> >s->iotlb_head. The hash helps in fast lookup, and the MRU list helps in
> >knowing whether the cache is still hot.
> >
> >After we have such a MRU list, replacing all the iterators of IOTLB
> >entries by using list iterations rather than hash table iterations.
> 
> Any reason of doing this, I thought hashtable was even a little bit faster?

Could I ask why?

I thought they are merely the same (when iterating all the items)?

-- 
Peter Xu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]