STRUCT PAGE_EXT_OPERATIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct page_ext_operations(9)

okay so bestie, welcome to the Kernel API Manual ✨ this one's about struct page_ext_operations β€” the per page_ext client operations. yes i know, sounds intimidating, but it's literally just the little form your page_ext client fills out so the kernel knows what it wants πŸŽ€


🌸 NAME

struct page_ext_operations β€” per page_ext client operations 🫢


✨ SYNOPSIS

struct page_ext_operations {
    size_t offset;
    size_t size;
    bool (*need)(void);
    void (*init)(void);
    bool need_shared_flags;
 };

look at her. five fields. iconic. πŸ‘‘


πŸŽ€ Members

  • offset β€” Offset to the client's data within page_ext. and like, the offset is returned to the client by page_ext_init. that's the whole vibe πŸ’«
  • size β€” The size of the client data within page_ext. so the kernel knows how much room to set aside for you 😌
  • need β€” Function that returns true if client requires page_ext. no cap, that's it β€” true means "yes queen i need it" πŸ’…
  • init β€” (optional) Called to initialize client once page_exts are allocated. like the lil "you're all set up now" moment πŸ¦‹
  • need_shared_flags β€” true when client is using shared page_ext->flags field. shared is the keyword here bestie, don't forget it 🌈

🧚 DESCRIPTION

so here's the tea: each Page Extension client must define page_ext_operations in the page_ext_ops array. that's not a suggestion, that's the rule, periodt πŸ”₯


πŸ‘‘ SEE ALSO

Kernel file ./include/linux/page_ext.h, plus these iconic siblings:


fr fr, if you're writing a page_ext client, define your page_ext_operations in page_ext_ops or you're gonna have a bad time 😭

and that's the whole page bestie πŸ’– this one comes from ./include/linux, dated October 2026, for struct page_ext_operations(9) β€” slay, go read the header, iykyk 🌟

πŸ“¦ where this page comes from