diff options
author | Jason Wang <jasowang@redhat.com> | 2019-05-17 07:29:49 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-05-27 18:08:22 +0300 |
commit | e82b9b0727ff6d665fff2d326162b460dded554d (patch) | |
tree | c88a7558ef9b90b1de6415a9cf99bb0206b71fad /drivers/siox | |
parent | 6166e5330c3828699859a6ec1af21eef7c58778c (diff) | |
download | linux-e82b9b0727ff6d665fff2d326162b460dded554d.tar.xz |
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>
Diffstat (limited to 'drivers/siox')
0 files changed, 0 insertions, 0 deletions