HomeFreeBSD

vfs: reduce spurious zeroing in VOP_STAT

Description

vfs: reduce spurious zeroing in VOP_STAT

clang fails to take advantage of the fact that majority of the struct
gets written to in the routine and decides to bzero the entire thing.

Explicitly zero padding and spare fields, relying on KMSAN to catch
problems should anything pop up later which also needs explicit
zeroing.

fstat on tmpfs (ops/s):
before: 8216636
after: 8508033

Details

Provenance
mjgAuthored on Mar 12 2022, 11:49 AM
Parents
rG381dd12cea17: vfs: stop evaluating the argument multpile times in stat macros
Branches
Unknown
Tags
Unknown