linux/drivers/virtio
Adam Litke 1f34c71afe virtio: Fix scheduling while atomic in virtio_balloon stats
This is a fix for my earlier patch: "virtio: Add memory statistics reporting to
the balloon driver (V4)".

I discovered that all_vm_events() can sleep and therefore stats collection
cannot be done in interrupt context.  One solution is to handle the interrupt
by noting that stats need to be collected and waking the existing vballoon
kthread which will complete the work via stats_handle_request().  Rusty, is
this a saner way of doing business?

There is one issue that I would like a broader opinion on.  In stats_request, I
update vb->need_stats_update and then wake up the kthread.  The kthread uses
vb->need_stats_update as a condition variable.  Do I need a memory barrier
between the update and wake_up to ensure that my kthread sees the correct
value?  My testing suggests that it is not needed but I would like some
confirmation from the experts.

Signed-off-by: Adam Litke <agl@us.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Anthony Liguori <aliguori@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-24 14:22:14 +10:30
..
Kconfig virtio: balloon driver 2008-02-04 23:50:13 +11:00
Makefile virtio: balloon driver 2008-02-04 23:50:13 +11:00
config.c Virtio interface 2007-10-23 15:49:54 +10:00
virtio.c virtio: enhance id_matching for virtio drivers 2009-06-12 22:16:40 +09:30
virtio_balloon.c virtio: Fix scheduling while atomic in virtio_balloon stats 2010-02-24 14:22:14 +10:30
virtio_pci.c Add __devexit_p around reference to virtio_pci_remove 2010-02-24 14:22:04 +10:30
virtio_ring.c virtio: order used ring after used index read 2009-10-29 08:50:37 +10:30