HomeFreeBSD

loader bcache: Allow readahead up to 256 kB I/Os

Description

loader bcache: Allow readahead up to 256 kB I/Os

Prior to this commit, the loader would perform readaheads of up to
128 kB; when booting on a UFS filesystem this resulted in a series
of 160 kB reads (32 kB request + 128 kB readahead).

This commit allows readaheads to be longer, subject to a total I/O
size limit of 256 kB; i.e. 32 kB read requests will have added
readaheads of up to 224 kB.

In my testing on an EC2 c5.xlarge instance, this change reduces the
boot time by roughly 80 ms.

Reviewed by: tsoome
MFC after: 1 week
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D32251

Details

Provenance
cpercivaAuthored on Oct 3 2021, 9:55 PM
Reviewer
tsoome
Differential Revision
D32251: loader bcache: Allow readahead up to a maximum I/O size of 256 kB
Parents
rG04b9b7c507c5: loader bcache: Track unconsumed readahead
Branches
Unknown
Tags
Unknown