HomeFreeBSD

cache: depessimize hashing macros/inlines

Description

cache: depessimize hashing macros/inlines

All hash sizes are power-of-2, but the compiler does not know that for sure
and 'foo % size' forces doing a division.

Store the size - 1 and use 'foo & hash' instead which allows mere shift.

Details

Provenance
mjgAuthored on
Parents
rS310766: cache: drop the NULL check from VP2VNODELOCK
Branches
Unknown
Tags
Unknown