sk_page_frag(9)
π 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 intosk_page_fragwhile it's already in use: explicitly avoid taskpage_fragwhen users disablesk_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:
struct sock_common(9)struct sock(9)sk_user_data_is_nocopy(9)__locked_read_sk_user_data_with_flags(9)__rcu_dereference_sk_user_data_with_flags(9)sk_for_each_entry_offset_rcu(9)SOCK_CONNECT_BIND(9)lock_sock_fast(9)unlock_sock_fast(9)sk_wmem_alloc_get(9)sk_rmem_alloc_get(9)sk_has_allocations(9)skwq_has_sleeper(9)sock_poll_wait(9)_sock_tx_timestamp(9)sk_eat_skb(9)
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
- 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