]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6216ef81ccc802e3725b76d77a6d593a57353e22
tree713d38823efda30222230314bcae26b919782f16
parent6888df8e4b9213f43730e483b602e96e4836f449
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