gfs2: Limit the maximum amount of requested space
When allocating blocks for an inode, gfs2 tries to keep future allocations
efficient by requesting the blocks adjacent to the allocated blocks for future
use by this inode. These "reservations" are node-local, and they can be stolen
by other nodes or even other processes on the same node when necessary.
Stealing from those reservations is very inefficient because it involves
scanning the bitmaps, repeatedly. This slows down workloads that create many
small files, for example. Fix this by discarding some of those reservations as
soon as they cover more than half of the remaining space.
Fixes xfstests generic/488, generic/531.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 file changed