virtio-balloon: improve update_balloon_size_func
authorWei Wang <wei.w.wang@intel.com>
Mon, 7 Jan 2019 07:01:05 +0000 (15:01 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 6 Mar 2019 16:19:33 +0000 (11:19 -0500)
commit53e946cb347e8993cee1d091c97a38be73d34bdd
treeac1cc6a6413031afedf6d2c789c318fa6e001392
parentfd1068e1860e44aaaa337b516df4518d1ce98da1
virtio-balloon: improve update_balloon_size_func

There is no need to update the balloon actual register when there is no
ballooning request. This patch avoids update_balloon_size when diff is 0.

Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_balloon.c