kernel - Attempt to fix cluster pbuf deadlock on recursive filesystems
* Change global pbuf count limits (used primarily for clustered I/O) to
per-mount and per-device limits. The per-mount / per-device limit
is set to nswbuf_kva / 10, allowing 10 different entities to obtain
pbufs concurrently without interference.
* This change goes a long way towards fixing deadlocks that could occur
with the old global system (a global limit of nswbuf_kva / 2) when
the I/O system recurses through a virtual block device or filesystem.
Two examples of virtual block devices are the 'vn' device and the crypto
layer.
* We also note that even normal filesystem read and write I/O strategy calls
will recurse at least once to dive the underlying block device. DFly also
had issues with pbuf hogging by one mount causing unnecessary stalls
in other mounts. This fix also prevents pbuf hogging.
* Remove unused internal O_MAPONREAD flag.
Reported-by: htse, multiple
Testing-by: htse, dillon
12 files changed: