sk_page_frag(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– sk_page_frag πŸ’–

okay so bestie, welcome to the Kernel API Manual page for sk_page_frag β€” it's giving β€œtiny helper, very important context check” energy, and we're gonna get you comfy with it ✨


🌸 NAME 🌸

sk_page_frag β€” return an appropriate page_frag πŸ’…


✨ SYNOPSIS ✨

struct page_frag * sk_page_frag (struct sock *sk );

πŸŽ€ ARGUMENTS πŸŽ€

  • sk β€” socket. That's the whole argument, bestie, just a socket 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Use the per task page_frag instead of the per socket one for optimization when we know that we're in process context and own everything that's associated with current. Yes, this is the β€œwe can flex the per task one” situation ✨

⚠️ Important recursion tea: both direct reclaim and page faults can nest inside other socket operations and end up recursing into sk_page_frag while it's already in use: explicitly avoid task page_frag when users disable sk_use_task_frag. No cap, that's the caveat.

πŸ’– RETURN πŸ’–

A per task page_frag if context allows that, otherwise a per socket one. That's the whole return vibe check πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./include/net/sock.h β€” plus the whole friend group:


That's the page, bestie πŸŽ€ It's from ./include/net, dated October 2026, and it's sk_page_frag(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from