Opened 6 months ago

Closed 2 months ago

#18929 closed enhancement (fixed)

[BFS] Optimize BlockAllocator::AllocateBlocks' block-search routine

Reported by: waddlesplash Owned by: axeld
Priority: normal Milestone: R1/beta6
Component: File Systems/BFS Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

At present, it just uses the fFirstFree to find the first free block and then (if the other sanity checks succeed) looks for free blocks one bit at a time. Instead, it could use bit-operations like fls as well as just checking if all the bits in an int32 are set, which should significantly speed things up.

On partitions with fragmentation, BlockAllocator::AllocateBlocks can form a large part of the total time needed to write files (in one profiling trace X512 sent to me, it was over 80% of the total; though admittedly the profiler could be mistaken.)

Change History (2)

comment:2 by waddlesplash, 2 months ago

Milestone: UnscheduledR1/beta6
Resolution: fixed
Status: newclosed

Fixed in hrev58208.

Note: See TracTickets for help on using tickets.