HomeFreeBSD

Improve entropy for ZFS taskqueue selection.

Description

Improve entropy for ZFS taskqueue selection.

I just found that at least on Skylake CPUs cpu_ticks() never returns odd
values, only even, and possibly has even bigger step (176/2?), that makes
its lower bits very bad entropy source, leaving half of taskqueues unused.
Switch to sbinuptime(), closer to upstreams, mitigates the problem by the
rate conversion working as kind of hash function. In case that is somehow
not enough (timer rate is too low or too divisible) mix in curcpu.

MFC after: 1 week

Details

Provenance
mavAuthored on
Parents
rS344902: sh/tests: Improve failure messages of expansion/arith15.0
Branches
Unknown
Tags
Unknown