Re: [Alacrityvm-devel] [KVM PATCH v2 1/2] KVM: export lockless GSI attribute

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

 



Avi Kivity wrote:
> On 10/26/2009 05:38 PM, Gregory Haskins wrote:
>>>> Instead of a lockless attribute, how about a ->set_atomic() method. 
>>>> For
>>>> msi this can be the same as ->set(), for non-msi it can be a function
>>>> that schedules the work (which will eventually call ->set()).
>>>>
>>>> The benefit is that we make a decision only once, when preparing the
>>>> routing entry, and install that decision in the routing entry
>>>> instead of
>>>> making it again and again later.
>>>>        
>>> Yeah, I like this idea.  I think we can also get rid of the custom
>>> workqueue if we do this as well, TBD.
>>>      
>> So I looked into this.  It isn't straight forward because you need to
>> retain some kind of state across the deferment on a per-request basis
>> (not per-GSI).  Today, this state is neatly tracked into the irqfd
>> object itself (e.g. it knows to toggle the GSI).
>>    
> 
> Yes, and it also contains the work_struct.
> 
> What if we make the work_struct (and any additional state) part of the
> set_atomic() argument list?  Does it simplify things?

Hmmm, that might not, but we could do a kmalloc(GFP_ATOMIC) for such
parameters.  Considering this is just a safety net, perhaps this would
work fine.

> 
>> So while generalizing this perhaps makes sense at some point, especially
>> if irqfd-like interfaces get added, it probably doesn't make a ton of
>> sense to expend energy on it ATM.  It is basically a generalization of
>> the irqfd deferrment code.  Lets just wait until we have a user beyond
>> irqfd for now.  Sound acceptable?
>>    
> 
> I'll look at v3, but would really like to disentangle this.

Ok, I will see what I can do.  I need at least a v4 to get rid of the
dependency on the now defunct v3:1/3 patch per yesterdays discussion.

Kind Regards,
-Greg

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux