aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/sun
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-01-12 15:44:43 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-01-12 15:44:43 +1030
commitee7cd8981e15bcb365fc762afe3fc47b8242f630 (patch)
treedd680789368f78aae6fcfb521fe55d868eff3b5f /firmware/sun
parent3b720b8c865098c49c1570b6b5c7832bcfa6e6c2 (diff)
downloadkernel_goldelico_gta04-ee7cd8981e15bcb365fc762afe3fc47b8242f630.zip
kernel_goldelico_gta04-ee7cd8981e15bcb365fc762afe3fc47b8242f630.tar.gz
kernel_goldelico_gta04-ee7cd8981e15bcb365fc762afe3fc47b8242f630.tar.bz2
virtio: expose added descriptors immediately.
A virtio driver does virtqueue_add_buf() multiple times before finally calling virtqueue_kick(); previously we only exposed the added buffers in the virtqueue_kick() call. This means we don't need a memory barrier in virtqueue_add_buf(), but it reduces concurrency as the device (ie. host) can't see the buffers until the kick. In the unusual (but now possible) case where a driver does add_buf() and get_buf() without doing a kick, we do need to insert one before our counter wraps. Otherwise we could wrap num_added, and later on not realize that we have passed the marker where we should have kicked. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'firmware/sun')
0 files changed, 0 insertions, 0 deletions