readahead_expand(9)
π readahead_expand(9) π
okay bestie, welcome to the Kernel API Manual β todayβs main character is readahead_expand, and she is here to make a readahead request bigger. no cap. π«Ά
πΈ NAME πΈ
readahead_expand β expand a readahead request β¨
π¦ SYNOPSIS π¦
void readahead_expand (struct readahead_control *ractl , loff_t
new_start , size_t new_len );
β¨ ARGUMENTS β¨
ractlβ the request to be expanded, sheβs the one getting the glow-up πnew_startβ the revised startnew_lenβ the revised size of the request
π« DESCRIPTION π«
so hereβs the vibe: this function attempts to expand a readahead request outwards from the current size to the specified size, by inserting locked pages before and after the current window so the size increases to the new window. π
this may involve the insertion of THPs, in which case the window may get expanded even beyond what was requested. yes, bestie, it can overshoot β itβs giving βwe went a little extraβ π
the algorithm will stop if it encounters a conflicting page already in the pagecache and leave a smaller expansion than requested. lowkey tragic, but thatβs the rule π
the caller must check for this by examining the revised ractl object for a different expansion than was requested. literally check your revised ractl, bestie β the expansion might not be the one you asked for π
π SEE ALSO π
- Kernel file
./mm/readahead.cβReadahead Overview(9) read_pages(9)page_cache_ra_unbounded(9)
mwah π this page is signed off from ./mm, October 2026 edition β readahead_expand(9) out. stay hydrated and may your expansions be exactly what you requested (unless THPs say otherwise) ππ
π¦ 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