vhost: introduce vhost_exceeds_weight()
We used to have vhost_exceeds_weight() for vhost-net to: - prevent vhost kthread from hogging the cpu - balance the time spent between TX and RX This function could be useful for vsock and scsi as well. So move it to vhost.c. Device must specify a weight which counts the number of requests, or it can also specific a byte_weight which counts the number of bytes that has been processed. Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
parent
6166e533
-
mentioned in commit c051fb97
-
mentioned in commit ad5fc895
-
mentioned in commit 2a59b04b
-
mentioned in commit 66c8d9d5
-
mentioned in commit 9e0b3406
-
mentioned in commit 264b563b
-
mentioned in commit e93482df
-
mentioned in commit 17b919f0
-
mentioned in commit aac633e9
-
mentioned in commit 6890ea59
-
mentioned in commit 7ddf32d1
Please register or sign in to comment