vhost: add pipe event for optimizing negotiation
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Wed, 28 Mar 2018 05:49:25 +0000 (22:49 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 15:25:45 +0000 (17:25 +0200)
commitd64c43773abe9326cc028ecda81b8f9e4117b551
tree063c210a83b27746f1fa290b1b2dd950fc7d23a5
parent9426ee2678d8ff96019496e314ee0f18b7e3d63e
vhost: add pipe event for optimizing negotiation

When vhost-user connects qemu successfully, dpdk will call
the vhost_user_add_connection to add unix socket fd to poll.
And fdset_add only set the socket fd to a fdentry while poll
may sleep now. In a general case, this is no problem. But if
we use hot update for vhost-user, most downtime of VMs network
is 750+ms. This patch adds pipe event, so after connections are
ok, dpdk rebuild the poll immediately. With this patch, the
most downtime is 20~30ms.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/fd_man.c
lib/librte_vhost/fd_man.h
lib/librte_vhost/socket.c