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

Re: [Xen-devel] Possible Xen grant table locking improvements



>>> On 20.10.14 at 20:06, <msw@xxxxxxxxx> wrote:
> On Mon, Oct 20, 2014 at 06:35:47PM +0100, David Vrabel wrote:
>> ### Possible Problems
>> 
>> 1. The "fast" maptrack entries cause a problem when destroying domains.
>> 
>> A domain being destroyed need tear down all active grant maps it has.
>> It currently does this with a O(M) operation -- iterating over all the
>> maptrack entries.
>> 
>> With the "fast" maptrack entries being stored in the remote domain's
>> active grant entry tables, a walk of all map track entries must iterate
>> over /every/ domains' active grant entry tables /and/ the local maptrack
>> table).  This is O(D * G + M), which is maybe too expensive?
>> 
>> (D = number of domains, G = mean grant table size, M = number of local
>> maptrack entries).
> 
> Hmmmm, that doesn't sound ideal. I suppose we would also need to walk
> all of the active grant entry tables under a lock, which might make
> the overall runtime of this operation unpredictable under various load
> conditions.

It would seem possible to at least limit the set of domains to look at:
We could introduce a bitmap (or rangeset) where we track which
other domains a given one mapped grants from. Assuming that
other than Dom0 would likely serve only a strict subset of all domains,
this might already be a win (and domain destruction is slow anyway).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.