HomeFreeBSD

ARC: Remove b_bufcnt/b_ebufcnt from ARC headers

Description

ARC: Remove b_bufcnt/b_ebufcnt from ARC headers

In most cases we do not care about exact number of buffers linked
to the header, we just need to know if it is zero, non-zero or one.
That can easily be checked just looking on b_buf pointer or in some
cases derefencing it.

b_ebufcnt is read only once, and in that case we already traverse
the list as part of arc_buf_remove(), so second traverse should not
be expensive.

This reduces L1 ARC header size by 8 bytes and full crypto header by
16 bytes, down to 176 and 232 bytes on FreeBSD respectively.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15350

Details

Provenance
mavAuthored on Oct 6 2023, 3:56 PM
GitHub <noreply@github.com>Committed on Oct 6 2023, 3:56 PM
Parents
rG82d229139839: CI: add FreeBSD build with Cirrus CI
Branches
Unknown
Tags
Unknown