HomeFreeBSD

Remove b_pabd/b_rabd allocation from arc_hdr_alloc()

Description

Remove b_pabd/b_rabd allocation from arc_hdr_alloc()

When a header is allocated for full overwrite it is a waste of time
to allocate b_pabd/b_rabd for it, since arc_write() will free them
without ever being touched. If it is a read or a partial overwrite
then arc_read() and arc_hdr_decrypt() allocate them explicitly.

Reduced memory allocation in user threads also reduces ARC eviction
throttling there, proportionally increasing it in ZIO threads, that
is not good. To minimize or even avoid it introduce ARC allocation
reserve, allowing certain arc_get_data_abd() callers to allocate a
bit longer in situations where user threads will already throttle.

Reviewed-by: George Wilson <gwilson@delphix.com>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #12398

Details

Provenance
mavAuthored on Aug 17 2021, 4:15 PM
Tony Hutter <hutter2@llnl.gov>Committed on Sep 14 2021, 9:31 PM
Parents
rG61773f41b898: Optimize arc_l2c_only lists assertions
Branches
Unknown
Tags
Unknown