virtio: add api for delayed callbacks
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 19 May 2011 23:11:14 +0000 (02:11 +0300)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 30 May 2011 01:44:16 +0000 (11:14 +0930)
commit7ab358c23cbf15cea08129cd722d1ce77433a94d
tree713d38823efda30222230314bcae26b919782f16
parent4423fe40b03f32b11e72ecfa03077e702e55d5a9
virtio: add api for delayed callbacks

Add an API that tells the other side that callbacks
should be delayed until a lot of work has been done.
Implement using the new event_idx feature.

Note: it might seem advantageous to let the drivers
ask for a callback after a specific capacity has
been reached. However, as a single head can
free many entries in the descriptor table,
we don't really have a clue about capacity
until get_buf is called. The API is the simplest
to implement at the moment, we'll see what kind of
hints drivers can pass when there's more than one
user of the feature.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio_ring.c
include/linux/virtio.h