bch_next_delay(9)
π bch_next_delay π
ok so bestie, this is a page from the Kernel API Manual β section 9 β and it's literally all about bch_next_delay, which is your little rate-limiting bestie in the kernel. it updates the ratelimiting stats and then tells you how long to chill before doing more work. slay. β¨
πΈ NAME πΈ
bch_next_delay β update ratelimiting statistics and calculate next delay π
π¦ SYNOPSIS π¦
uint64_t bch_next_delay (struct bch_ratelimit *d , uint64_t done );
like, yes, that's the whole signature. she's little but she's doing the most. π
β ARGUMENTS β
dβ thestruct bch_ratelimitto update. this is the main character of the whole function ngl πdoneβ the amount of work done, in arbitrary units. yes, arbitrary β the units are whatever you and your code decided they are, no cap π
π₯ DESCRIPTION π₯
Okay so here's the tea: bch_next_delay increments d by the amount of work done β that's your done value β and then returns how long to delay in jiffies until the next time to do some work. β³
That's it. That's the whole vibe. It's giving "accounting + scheduling bestie" energy. Lowkey iconic. π
π«Ά SEE ALSO π«Ά
- Kernel file
./drivers/md/bcache/util.cbch_hprint(9) bch_bio_alloc_pages(9)
go read those too, iykyk πβ¨
and that's the whole page, bestie!! ππ this one came from ./drivers/md/bcache, dated October 2026 β mwah, go forth and rate-limit responsibly ππ¦
π¦ 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