Skip to content
Commit eabe0444 authored by Andrey Sidorov's avatar Andrey Sidorov Committed by Theodore Ts'o
Browse files

ext4: speed-up releasing blocks on commit



Improve mb_free_blocks speed by clearing entire range at once instead
of iterating over each bit. Freeing block-by-block also makes buddy
bitmap subtree flip twice making most of the work a no-op. Very few
bits in buddy bitmap require change, e.g. freeing entire group is a 1
bit flip only.  As a result, releasing blocks of 60G file now takes
5ms instead of 2.7s.  This is especially good for non-preemptive
kernels as there is no rescheduling during release.

Signed-off-by: default avatarAndrey Sidorov <qrxd43@motorola.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 5c1ff336
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment