[RFC] improve malloc for large filesystems - limit scanning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, yet another patch.

There is an issue with current mballoc on huge filesystems - when a small allocation is requested, mballoc turns it into a group preallocation (512 blocks by default),
then scans all bitmaps to find this good chunk. The problem is that stages 0 and 1 are optimised for CPU cycles and skip not-interesting groups, but to learn
the group is not interesting it should be initialised. If it’s not then IO is required. If the filesystem is highly fragmented then it may take hours (literally) to find this good
chunk. The previous prefetching patch improves this, but still leads to lots of IO and very expensive allocations in some cases.
This patch changes mballoc in a different way - as stages 0/1 are optimisations, we can skip them for non-initialised groups (e.g. right after mount) and just scan
bitmaps for all available blocks (stage 2).

Please review.

Thanks, Alex

Attachment: 0001-mballoc-limit-scanning-of-uninitialized-groups.patch
Description: 0001-mballoc-limit-scanning-of-uninitialized-groups.patch


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux