]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
The abd child/parent relationship does not need to be tracked
authorMatthew Ahrens <matthew.ahrens@delphix.com>
Sat, 30 Jan 2021 18:04:42 +0000 (10:04 -0800)
committerGitHub <noreply@github.com>
Sat, 30 Jan 2021 18:04:42 +0000 (10:04 -0800)
commit2d4bbd14fca11fd5d990fca537d2f7cc9b32d6a7
treefc5e3cea5ce7da0ea4568bcd76297573c6381c7a
parentcf0a6dd3ede987212cad7f7c0afed64e54bd9975
The abd child/parent relationship does not need to be tracked

ABD's currently track their parent/child relationship.  This applies to
`abd_get_offset()` and `abd_borrow_buf()`.  However, nothing depends on
knowing this relationship, it's only used for consistency checks to
verify that we are not destroying an ABD that's still in use.  When we
are creating/destroying ABD's frequently, the performance impact of
maintaining these data structures (in particular the atomic
increment/decrement operations) can be measurable.

This commit removes this verification code on production builds, but
keeps it when ZFS_DEBUG is set.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11535
include/sys/abd.h
module/zfs/abd.c