readahead_expand(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 start
  • new_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 🌟


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