qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself
Date: Thu, 06 May 2010 13:00:00 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

On 05/05/2010 11:58 PM, Michael S. Tsirkin wrote:
+       /* We publish the last-seen used index at the end of the available ring.
+        * It is at the end for backwards compatibility. */
+       vr->last_used_idx =&(vr)->avail->ring[num];
+       /* Verify that last used index does not spill over the used ring. */
+       BUG_ON((void *)vr->last_used_idx +
+              sizeof *vr->last_used_idx>  (void *)vr->used);
  }

Shouldn't this be on its own cache line?

One way to achieve this is to allocate it at the end.

--
error compiling committee.c: too many arguments to function





reply via email to

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