]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Modernize geom_stats_snapshot_get
authorAlan Somers <asomers@FreeBSD.org>
Wed, 3 Mar 2021 20:06:38 +0000 (13:06 -0700)
committerAlan Somers <asomers@FreeBSD.org>
Thu, 8 Apr 2021 21:33:22 +0000 (21:33 +0000)
commite0c4ed73f3a6a83f24d9a0bfe89f288ff1b93463
tree583e44c505ddc8f0c19cf69b1eeae736578b6cb8
parentdee863a2b5a5d8ad8a1e661dac677a48f55431b3
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)
lib/libgeom/geom_stats.c