summaryrefslogtreecommitdiff
tag nameiwalk-remove-indirect-calls-5.13_2021-03-18 (cfa2373c4fad92490a37c09df61f30336271c091)
tag date2021-03-18 15:26:31 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 06dbbbc51e...
xfs: reduce indirect function calls
This short series reduces the number of indirect function calls when we want to iterate the incore inode radix tree, and reduces the number of arguments that must be passed to the walk function. I made a few observations about incore inode radix tree walks -- the one caller (blockgc) that cares about radix tree tags is internal to xfs_icache.c, and there's a 1:1 mapping between that tag and the iterator function. Furthermore, the only other caller (quotaoff) is the only caller to supply a nonzero flags argument, and it never specifies a radix tree tag. On those grounds, we can remove both the flags and tag arguments to xfs_inode_walk; and for the internal caller, we can replace the indirect call with direct calls to the blockgc functions. This makes for less ugly code and gives us a (negligible) performance bump. This series is a prerequisite for the next patchset, since deferred inode inactivation will add another inode radix tree tag and iterator function to go with it.