kho_block_set_shrink(9)
π kho_block_set_shrink(9) π
okay so welcome to the Kernel API Manual, bestie π this page is about kho_block_set_shrink, and it is literally the βshrink the block set to accommodate the target countβ girly. no cap, itβs giving cleanup era β¨
β¨ NAME β¨
kho_block_set_shrink β shrink the block set to accommodate the target count. periodt. π
πΈ SYNOPSIS πΈ
the synopsis is exactly this, character for character:
void kho_block_set_shrink (struct kho_block_set *bs , u64 count );
π ARGUMENTS π
bsβ the block set. main character energy, honestly.countβ the target number of valid entries to accommodate. like, the number youβre trying to fit. π«Ά
π¦ DESCRIPTION π¦
okay so hereβs the tea: kho_block_set_shrink releases and unallocates redundant preserved memory blocks. it also checks if the last block in the set can be removed because the remaining entry count is fully accommodated by the preceding blocks. so if the earlier blocks can fully hold whatβs left, the last block can go bye-bye. slay π
π NOTE π
bestie, this is the part where you pay attention. it is the callerβs responsibility to ensure that entries are removed in the reverse order of their insertion. because shrinking destroys the last block in the set, removing entries in any other order would corrupt active data. π not me being dramatic, but fr fr: reverse order only. periodt.
π CONTEXT π
caller must hold a lock protecting the block set. that is not a suggestion, bestie β hold that lock. π
π SEE ALSO π
- Kernel file
./kernel/liveupdate/kho_block.c KHO Serialization Blocks(9)kho_block_set_init(9)kho_block_set_grow(9)kho_block_set_restore(9)kho_block_set_destroy(9)kho_block_set_clear(9)kho_block_set_it_init(9)kho_block_set_it_reserve_entry(9)kho_block_set_it_read_entry(9)kho_block_set_it_prev(9)
and thatβs the whole page, bestie π«Ά source/version: ./kernel/liveupdate; date: October 2026; page: kho_block_set_shrink(9). 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