pte_move_swp_offset(9)
π pte_move_swp_offset(9) β from the Kernel API Manual, bestie π
okay so we're deep in the kernel docs today and this one is literally called pte_move_swp_offset β yes it's a mouthful, no I didn't name it, but honestly? she's iconic for what she does.
β¨ NAME β¨
pte_move_swp_offset β moves the swap entry offset field of a swap pte forward or backward by delta. that's the whole vibe. sliding the offset around. no cap. π¦
πΈ SYNOPSIS πΈ
pte_t pte_move_swp_offset (pte_t pte , long delta );
like any good function she takes two things and gives you a pte_t back. periodt. π
π«Ά ARGUMENTS π«Ά
pteβ the initial pte state, and listen, it must be a swap entry. not optional, not a suggestion, it's giving "read the room". πdeltaβ the direction and the offset we're moving, both in one cute littlelong. forward ifdeltais positive, backward ifdeltais negative. yes she's doing double duty and she's slaying it. β¨
π DESCRIPTION π
so what actually happens: she moves the swap offset, but β and this is the important part, bestie, don't skip it β she maintains all other fields, including the swap type and any swp pte bits. everything else stays exactly where it was. untouched. unbothered. main character energy for the offset only. π
and then? the resulting pte is returned. that's it, that's the whole function, go forth and slide those offsets. π§
π₯ SEE ALSO π₯
sibling links, the whole friend group, we love a supportive group chat:
- Kernel file
./mm/internal.h folio_pte_batch_flags(9)pte_next_swp_offset(9)swap_pte_batch(9)sync_with_folio_pmd_zap(9)folio_evictable(9)vma_filebacked_address(9)vma_anon_address(9)
and that's the page!! π brought to you straight out of ./mm, dated October 2026, signed off with pte_move_swp_offset(9) β love her, mean it, bye bestie!! πππ¦
π¦ 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