]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove duplicate dbufs accounting.
authorAlexander Motin <mav@FreeBSD.org>
Fri, 7 Feb 2020 15:50:47 +0000 (15:50 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Fri, 7 Feb 2020 15:50:47 +0000 (15:50 +0000)
commit8d8e484d9cf5fa9f7dd2d1dba5f5345e76b7649b
treef77eddde774340b7afda100d1bbb5584001a9b62
parenta1b769b32d39ab3bab76f46c39483fb80801cda8
Remove duplicate dbufs accounting.

Since AVL already has embedded element counter, use dn_dbufs_count
only for dbufs not counted there (bonus buffers) and just add them.
This removes two atomics per dbuf life cycle.

According to profiler it reduces time spent by dbuf_destroy() inside
bottlenecked dbuf_evict_thread() from 13.36% to 9.20% of the core.

This counter is used only on illumos, so for FreeBSD it was just a
waste of time.

MFC after: 2 weeks
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h