]> 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)
commitcf40e6af1c37a7925cf00d5ad57ce75809ab6b2d
tree713d38823efda30222230314bcae26b919782f16
parenta95378ce1d9ee9f567439c59f13490c9fffd20bc
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