__flush_hash_table_range(9)
πΈ __flush_hash_table_range β NAME β¨
ok so __flush_hash_table_range π
β it flushes all the HPTEs for a given address range out of the hash table (and the TLB too, bestie!), but lowkey leaves the linux PTEs completely intact. no cap, they stay right where they are π«Ά
(this is page 9 of the Kernel API Manual, mwah π)
π¦ SYNOPSIS
void __flush_hash_table_range (unsigned long start , unsigned long end );
like, that's the whole signature. two unsigned longs and vibes β¨
π ARGUMENTS
startβ the starting address. where the party begins πendβ the ending address, and heads up: it's not included in the flush π (exclusive, iykyk)
π DESCRIPTION
ok so picture this: this function is mostly meant to be used by some IO hotplug code π₯ the goal is to remove all the hash entries from a given address range that was used to map IO space on a removed PCI-PCI bridge β without tearing down the full mapping. why? because 64K pages may overlap with other bridges when you're using 64K pages with 4K HW pages on IO space π it's giving "surgical, not scorched-earth."
and because of that exact usage pattern, it's implemented for small size rather than speed π so don't come at it expecting a speed demon β it was built petite, not fast. periodt.
ngl, it's a small-and-mighty situation, not a benchmark queen π
π SEE ALSO
- Kernel file
./arch/powerpc/mm/book3s64/hash_tlb.cβ go read it bestie, it's right there π§
βπ that's the whole page, fr fr. brought to you by ./arch/powerpc/mm/book3s64, dated October 2026, and honestly? iconic. slay π
β¨π
π¦ 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