HomeFreeBSD

random(4): depessimize arc4random

Description

random(4): depessimize arc4random

  • __predict_false reseeding on entry as it is almost never true.
  • don't blindly atomic_cmpset as on x86 it ends up dirtying the cacheline.

it almost ever succeeds per above

  • fetch the timestamp prior to getting the cpu number

Reviewed by: cem
Approved by: secteam (delphij)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20242

Details

Provenance
mjgAuthored on
Reviewer
cem
Differential Revision
D20242: Depessimize arc4rand
Parents
rS347499: fusefs: support kqueue for /dev/fuse
Branches
Unknown
Tags
Unknown