gfs2_rgrp_congested(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐ŸŒธ 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