summaryrefslogtreecommitdiff
path: root/fs/hostfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2010-07-20 09:43:39 +1000
committerDave Chinner <david@fromorbit.com>2010-07-20 09:43:39 +1000
commit16fd5367370099b59d96e30bb7d9de8d419659f2 (patch)
treea9c12adb84f363ac48a0846de7a9464b1631e464 /fs/hostfs
parent70e60ce71516c3a9e882edb70a09f696a05961db (diff)
xfs: track AGs with reclaimable inodes in per-ag radix tree
https://bugzilla.kernel.org/show_bug.cgi?id=16348 When the filesystem grows to a large number of allocation groups, the summing of recalimable inodes gets expensive. In many cases, most AGs won't have any reclaimable inodes and so we are wasting CPU time aggregating over these AGs. This is particularly important for the inode shrinker that gets called frequently under memory pressure. To avoid the overhead, track AGs with reclaimable inodes in the per-ag radix tree so that we can find all the AGs with reclaimable inodes via a simple gang tag lookup. This involves setting the tag when the first reclaimable inode is tracked in the AG, and removing the tag when the last reclaimable inode is removed from the tree. Then the summation process becomes a loop walking the radix tree summing AGs with the reclaim tag set. This significantly reduces the overhead of scanning - a 6400 AG filesystea now only uses about 25% of a cpu in kswapd while slab reclaim progresses instead of being permanently stuck at 100% CPU and making little progress. Clean filesystems filesystems will see no overhead and the overhead only increases linearly with the number of dirty AGs. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/hostfs')
0 files changed, 0 insertions, 0 deletions