gfs2_rgrp_congested(9)
๐ธ NAME ๐ธ
okay bestie, welcome to the Kernel API Manual page for gfs2_rgrp_congested(9) โ the function that does the congestion vibe check on a resource group, and yes it's giving โstatistics girlieโ ๐
gfs2_rgrp_congested โ use stats to figure out whether an rgrp is congested. no cap, thatโs the whole assignment.
โจ SYNOPSIS โจ
bool gfs2_rgrp_congested (const struct gfs2_rgrpd *rgd , int loops );
๐ ARGUMENTS ๐
rgdโ the rgrp in question, aka the resource group weโre side-eyeing ๐loopsโ an indication of how picky we can be:0= very,1= less so. so like, how much grace are we giving this thing?
๐ DESCRIPTION ๐
Okay so this function uses the recently added glock statistics to figure out whether a particular resource group is suffering from contention from multiple nodes. Itโs done purely on the basis of timings, because that is literally the only data we have to work with. And the aim here is to reject a resource group that is highly contended but โ very important โ not to do this too often, so we donโt land up introducing fragmentation by changing resource groups when itโs not actually required. periodt.
The calculation is fairly simple: we want to know whether the SRTTB (i.e. smoothed round trip time for blocking operations) to acquire the lock for this rgrpโs glock is significantly greater than the time taken for resource groups on average. We introduce a margin in the form of the variable var, which is computed as the sum of the two respective variances, and multiplied by a factor depending on loops and whether we have a lot of data to base the decision on. Then that gets tested against the square difference of the means to decide whether the result is statistically significant or not. itโs giving tiny stats class but make it filesystem ๐งฎโจ
๐ฅ RETURN ๐ฅ
A boolean verdict on the congestion status โ basically the yes/no on whether this rgrp is congested ๐ซถ
๐ฆ SEE ALSO ๐ฆ
Kernel file: ./fs/gfs2/rgrp.c โ and honestly the whole squad is tagged in here: gfs2_setbit(9), gfs2_testbit(9), gfs2_bit_search(9), rs_cmp(9), gfs2_bitfit(9), gfs2_rbm_from_block(9), gfs2_rbm_add(9), gfs2_unaligned_extlen(9), gfs2_free_extlen(9), gfs2_bitcount(9), gfs2_rgrp_verify(9), gfs2_blk2rgrpd(9), gfs2_rgrpd_get_first(9), gfs2_rgrpd_get_next(9), __rs_deltree(9), gfs2_rs_deltree(9), gfs2_rs_delete(9), return_all_reservations(9), compute_bitstructs(9), gfs2_ri_total(9), read_rindex_entry(9), set_rgrp_preferences(9), gfs2_ri_update(9), gfs2_rindex_update(9), gfs2_rgrp_go_instantiate(9), gfs2_rgrp_brelse(9), gfs2_fitrim(9), rs_insert(9), rgd_free(9), rg_mblk_search(9), gfs2_next_unreserved_block(9), gfs2_reservation_check_and_update(9), gfs2_rbm_find(9), try_rgrp_unlink(9), gfs2_rgrp_used_recently(9), fast_to_acquire(9), gfs2_inplace_reserve(9), gfs2_inplace_release(9), gfs2_alloc_extent(9), rgblk_free(9), gfs2_rgrp_dump(9), gfs2_adjust_reservation(9), gfs2_set_alloc_start(9), gfs2_alloc_blocks(9), __gfs2_free_blocks(9), gfs2_free_meta(9), gfs2_check_blk_type(9), gfs2_rlist_add(9), gfs2_rlist_alloc(9), gfs2_rlist_free(9).
xoxo, this page is sourced from ./fs/gfs2, dated October 2026, and itโs still the gfs2_rgrp_congested(9) manual page โ mwah ๐
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms