__sk_mem_raise_allocated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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:


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