]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement request queue overflow protection.
authorAlexander Motin <mav@FreeBSD.org>
Tue, 24 Nov 2020 04:16:49 +0000 (04:16 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Tue, 24 Nov 2020 04:16:49 +0000 (04:16 +0000)
commit0f99cb55ff4488ef7e193df73653dbcb47f82859
tree277a0990d014d25f9897457436597d696b7a9331
parentf90d57b808449f1bf8c6856a818174253d7e5e46
Implement request queue overflow protection.

Before this change in case of request queue overflow driver just froze the
device queue for 100ms to retry after.  It was pretty bad for performance.
This change introduces SIM queue freezing when free space on the request
queue drops below 255 entries (worst case of maximum I/O size S/G list),
checking for a chance to release it on I/O completion.  If the queue still
get overflowed somehow, the old mechanism is still in place, just with
delay reduced to 10ms.

With the earlier queue length increase overflows should not happen often,
but it is still easily reachable on synthetic tests.
sys/dev/isp/isp.c
sys/dev/isp/isp_freebsd.c
sys/dev/isp/isp_library.c
sys/dev/isp/isp_library.h
sys/dev/isp/ispmbox.h
sys/dev/isp/ispvar.h