HomeFreeBSD

Modernize geom_stats_snapshot_get

Description

Modernize geom_stats_snapshot_get

  • A logically useless memset() is used to fault in some memory pages. Change it to explicit_bzero so the compiler won't eliminate it.
  • Eliminate the second memset. It made sense in the days of the Big Kernel Lock, but not in the days of fine-grained SMP and especially not in the days of VDSO.

Sponsored by: Axcient
Reviewed by: phk
Differential Revision: https://reviews.freebsd.org/D29047

(cherry picked from commit f05b724ecb310fb91da1947ae6c68647f58f5f12)

Details

Provenance
asomersAuthored on Mar 3 2021, 8:06 PM
Reviewer
phk
Differential Revision
D29047: Modernize geom_stats_snapshot_get
Parents
R10:438e52f814f6: [skip ci] fix a typo in a comment in mdconfig.c
Branches
Unknown
Tags
Unknown