Re: [PATCHv2-RFC 0/2] virtio: put last seen used index into ring itself

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

 



On 05/30/10 13:22, Michael S. Tsirkin wrote:
> On Fri, May 28, 2010 at 11:56:54AM +0200, Jes Sorensen wrote:
>> It looks pretty good to me, however one thing I have been thinking of
>> while reading through it:
>>
>> Rather than storing a pointer within the ring struct, pointing into a
>> position within the same struct. How about storing a byte offset instead
>> and using a cast to get to the pointer position? That would avoid the
>> pointer dereference, which is less effective cache wise and harder for
>> the CPU to predict.
>>
>> Not sure whether it really matters performance wise, just a thought.
> 
> I think this won't work: when PUBLUSH_USED_IDX is negotiated,
> the pointer is to within the ring.

Hmmm shame, it would be a nice optimization.

Maybe it's time to introduce the v2 ring format, rather than having
adding more kludges to the existing one?

Cheers,
Jes
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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