aboutsummaryrefslogtreecommitdiff
path: root/vgasrc
diff options
context:
space:
mode:
authorDenis Plotnikov <dplotnikov@virtuozzo.com>2019-10-17 17:01:00 +0300
committerGerd Hoffmann <kraxel@redhat.com>2019-10-18 12:07:05 +0200
commit50093b4b229b47860c967038e2dc094263e6c9db (patch)
treeb28dd3da2539eb4b47daf465092d6f44584ce719 /vgasrc
parent43f5df79dad6738d52ea79d072de2b56eb96a91f (diff)
downloadseabios-hppa-50093b4b229b47860c967038e2dc094263e6c9db.zip
seabios-hppa-50093b4b229b47860c967038e2dc094263e6c9db.tar.gz
seabios-hppa-50093b4b229b47860c967038e2dc094263e6c9db.tar.bz2
virtio: extend virtio queue size to 256
The goal of the patch is to work around a performance bug in guest linux kernels. Old linux kernels has a performance flaw in virtio block device access: on some frequent disk access patterns, e.g. 1M read, the kernel produces more block requests than needed. This happens because of virtio seg_max parameter set to 126 (virtqueue_size - 2) which limits the maximum block request to 516096 (126 * 4096_PAGE_SIZE) bytes. Setting seg_max > 126 fixes the issue, however, not all linux kernels allow that without increasing virtio virtqueue size. The old kernels have a restriction: virtqueue_size >= seg_max. In case of the restriction violation the old kernels crash. The restriction is relaxed in the recent linux kernels (ver >= 4.13) with: commit 44ed8089e991a60d614abe0ee4b9057a28b364e4 Author: Richard W.M. Jones Date: Thu Aug 10 17:56:51 2017 +0100 scsi: virtio: Reduce BUG if total_sg > virtqueue size to WARN. and the recent linux kernels don't crash if total_sg > virtqueue size allowing to set seg_max to the needed value without virtqueue size increasing. To fix the performance flaw in the old linux kernels, it's needed to increse seg_max to 254, and comply the restriction by setting virtqueue_size to 256. This is achievable if seabios can support virtqueue size > 128 which this patch actually does. Windows kernels don't have virtqueue_size >= seg_max restriction and isn't affected with this kind of the performance bug. Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'vgasrc')
0 files changed, 0 insertions, 0 deletions