vhost: fix unnecessary dirty page logging
authorXuan Ding <xuan.ding@intel.com>
Thu, 7 Jul 2022 06:55:13 +0000 (06:55 +0000)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 8 Jul 2022 09:15:32 +0000 (11:15 +0200)
commitcd79d1b030bd69df31fd401d1b48c23df0f71d00
treebd8705ede15857989dc7090f14ac7d56d3f2d035
parente179bbee8056c8f4d73c53b1f4059cd1b9cb907a
vhost: fix unnecessary dirty page logging

The dirty page logging is only required in vhost enqueue direction for
live migration. This patch removes the unnecessary dirty page logging
in vhost dequeue direction. Otherwise, it will result in a performance
drop. Some if-else judgements are also optimized to improve performance.

Fixes: 6d823bb302c7 ("vhost: prepare sync for descriptor to mbuf refactoring")
Fixes: b6eee3e83402 ("vhost: fix sync dequeue offload")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Xingguang He <xingguang.he@intel.com>
lib/vhost/virtio_net.c