]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement unr64
authorMateusz Guzik <mjg@FreeBSD.org>
Tue, 20 Nov 2018 14:58:41 +0000 (14:58 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Tue, 20 Nov 2018 14:58:41 +0000 (14:58 +0000)
commit435bef7a2fac8b100cc5259b25165db1c08da49d
tree00e1e6a8c40db20412922134fdf54073f1a2b1ec
parentabfc3b2fef13ff0cd1bc061c11629ecbf4912e6f
Implement unr64

Important users of unr like tmpfs or pipes can get away with just
ever-increasing counters, making the overhead of managing the state
for 32 bit counters a pessimization.

Change it to an atomic variable. This can be further sped up by making
the counts variable "allocate" ranges and store them per-cpu.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18054
sys/kern/subr_unit.c
sys/sys/systm.h