__sk_mem_raise_allocated(9)
okay bestie, welcome to the page for __sk_mem_raise_allocated(9) from the Kernel API Manual β yes, it's a whole kernel function, and yes, we're gonna understand it. π
π NAME π
__sk_mem_raise_allocated β increase memory_allocated. That's the whole assignment, and it ate. β¨
β¨ SYNOPSIS β¨
Here's the signature, copied exactly so nobody comes for me:
int __sk_mem_raise_allocated (struct sock *sk , int size , int amt , int
kind );
π ARGUMENTS π
skβ socket. Like, the actual socket, bestie.sizeβ memory size to allocate.amtβ pages to allocate.kindβ allocation type.
π¦ DESCRIPTION π¦
So this one is similar to __sk_mem_schedule, but with one very important plot twist: it does not update sk_forward_alloc. Not me pointing that out twice, but it's kind of the whole thing. π
Unlike the globally shared limits among the sockets under the same protocol, consuming the budget of a memcg won't have a direct effect on other ones. So be optimistic about memcg's tolerance, and leave the callers to decide whether or not to raise allocated through sk_under_memory_pressure or its variants. That's the vibe check: optimistic about memcg, caller makes the call. π«Ά
π SEE ALSO π
Kernel file ./net/core/sock.c β and here's the whole squad, no cap:
sk_ns_capable(9)sk_capable(9)sk_net_capable(9)sk_set_memalloc(9)sk_alloc(9)sk_clone(9)skb_page_frag_refill(9)sk_wait_data(9)__sk_mem_schedule(9)__sk_mem_reduce_allocated(9)__sk_mem_reclaim(9)
That's the page, bestie π
. Source/version vibe is ./net/core, the date is October 2026, and this is the __sk_mem_raise_allocated(9) page β go off, king π.
π¦ 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