Jason Wang e82b9b0727 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>
2019-05-27 11:08:22 -04:00
..
2019-05-24 11:03:26 -07:00
2019-05-16 09:19:14 -07:00
2019-05-21 12:33:38 -07:00
2019-05-25 10:11:23 -07:00
2019-05-24 14:31:58 -07:00
2019-05-25 10:11:23 -07:00
2019-05-24 14:31:58 -07:00
2019-05-24 14:31:58 -07:00
2019-05-25 10:11:23 -07:00
2019-05-24 16:02:14 -07:00
2019-05-14 10:30:10 -07:00
2019-05-22 08:36:16 -07:00
2019-05-24 14:31:58 -07:00
2019-05-24 17:30:28 -07:00