aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorBaokun Li <[email protected]>2025-07-14 13:03:26 +0000
committerTheodore Ts'o <[email protected]>2025-07-25 13:14:17 +0000
commit6347558764911f88acac06ab996e162f0c8a212d (patch)
tree73703cc73295750b525ff7d9882bc294bd3f231c /tools/perf/scripts/python/gecko.py
parentext4: convert free groups order lists to xarrays (diff)
downloadkernel-6347558764911f88acac06ab996e162f0c8a212d.tar.gz
kernel-6347558764911f88acac06ab996e162f0c8a212d.zip
ext4: refactor choose group to scan group
This commit converts the `choose group` logic to `scan group` using previously prepared helper functions. This allows us to leverage xarrays for ordered non-linear traversal, thereby mitigating the "bouncing" issue inherent in the `choose group` mechanism. This also decouples linear and non-linear traversals, leading to cleaner and more readable code. Key changes: * ext4_mb_choose_next_group() is refactored to ext4_mb_scan_groups(). * Replaced ext4_mb_good_group() with ext4_mb_scan_group() in non-linear traversals, and related functions now return error codes instead of group info. * Added ext4_mb_scan_groups_linear() for performing linear scans starting from a specific group for a set number of times. * Linear scans now execute up to sbi->s_mb_max_linear_groups times, so ac_groups_linear_remaining is removed as it's no longer used. * ac->ac_criteria is now used directly instead of passing cr around. Also, ac->ac_criteria is incremented directly after groups scan fails for the corresponding criteria. * Since we're now directly scanning groups instead of finding a good group then scanning, the following variables and flags are no longer needed, s_bal_cX_groups_considered is sufficient. s_bal_p2_aligned_bad_suggestions s_bal_goal_fast_bad_suggestions s_bal_best_avail_bad_suggestions EXT4_MB_CR_POWER2_ALIGNED_OPTIMIZED EXT4_MB_CR_GOAL_LEN_FAST_OPTIMIZED EXT4_MB_CR_BEST_AVAIL_LEN_OPTIMIZED Signed-off-by: Baokun Li <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions