summaryrefslogtreecommitdiff
path: root/certs
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2016-01-25 17:38:06 +0100
committerMichael S. Tsirkin <mst@redhat.com>2016-03-11 01:40:18 +0200
commitfd0e21c31e1e6383af978239d07ced6e4e5d82c3 (patch)
treeaa3b42f69bdbf3bc8a9def98841d4b4c2fa1df85 /certs
parentfad7b7b27b6a168ca8ebc84482043886f837b89d (diff)
virtio_balloon: Allow to resize and update the balloon stats in parallel
The virtio balloon statistics are not updated when the balloon is being resized. But it seems that both tasks could be done in parallel. stats_handle_request() updates the statistics in the balloon structure and then communicates with the host. update_balloon_stats() calls all_vm_events() that just reads some per-CPU variables. The values might change during and after the call but it is expected and happens even without this patch. update_balloon_stats() also calls si_meminfo(). It is a bit more complex function. It too just reads some variables and looks lock-less safe. In each case, it seems to be called lock-less on several similar locations, e.g. from post_status() in dm_thread_func(), or from vmballoon_send_get_target(). The communication with the host is done via a separate virtqueue, see vb->stats_vq vs. vb->inflate_vq and vb->deflate_vq. Therefore it could be used in parallel with fill_balloon() and leak_balloon(). This patch splits the existing work into two pieces. One is for updating the balloon stats. The other is for resizing of the balloon. It seems that they can be proceed in parallel without any extra locking. Signed-off-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions