HomeFreeBSD

md: Get rid of the pbuf zone

Description

md: Get rid of the pbuf zone

The zone is used solely to provide KVA for mapping BIOs so that we can
pass mapped buffers to VOP_READ and VOP_WRITE. Currently we preallocate
nswbuf/10 bufs for this purpose during boot.

The intent was to limit KVA usage on 32-bit systems, but the
preallocation means that we in fact consumed more KVA than needed unless
one has more than nswbuf/10 (typically 25) vnode-backed MD devices
in existence, which I would argue is the uncommon case.

Meanwhile, all I/O to an MD is handled by a dedicated thread, so we can
instead simply preallocate the KVA region at MD device creation time.

Event: BSDCan 2023
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D40215

(cherry picked from commit 30038a8b4efc6d0b9f8f295e28bc205fe9728310)

Details

Provenance
markjAuthored on May 23 2023, 2:14 PM
Reviewer
kib
Differential Revision
D40215: md: Get rid of the pbuf zone
Parents
rG8711fd2103d2: kern_ntptime: Fix undefined behavior of the shift operator
Branches
Unknown
Tags
Unknown