rpc_malloc(9)
hey bestie π welcome to rpc_malloc(9), fresh from the Kernel API Manual. this is the kernel page about allocating RPC buffer resources, and she's lowkey iconic.
πΈ NAME πΈ
rpc_malloc β allocate RPC buffer resources. literally that's the job: it allocates RPC buffer resources, no cap.
π¦ SYNOPSIS π¦
int rpc_malloc (struct rpc_task *task );
π ARGUMENTS π
taskβ the RPC task. your main character task, fr.
π DESCRIPTION π
okay so a single memory region gets allocated, and it's split between the RPC call and the RPC reply that this task is being used for. when this RPC is retired, that memory is released by calling rpc_free. periodt.
to prevent rpciod from hanging, this allocator never sleeps. it's giving "no sleeping allowed." instead it returns -ENOMEM and suppresses the warning if the request cannot be serviced immediately. the caller can arrange to sleep in a way that is safe for rpciod, bestie.
most requests are 'small' (under 2KiB) and can be serviced from a mempool. that ensures NFS reads and writes can always proceed, and that there is good locality of reference for these buffers. slay for buffer locality honestly π
π SEE ALSO π
kernel file ./net/sunrpc/sched.c, plus these icons right here:
__rpc_do_wake_up_task_on_wq(9)rpc_wake_up_queued_task_set_status(9)rpc_wake_up_locked(9)rpc_wake_up(9)rpc_wake_up_status_locked(9)rpc_wake_up_status(9)rpc_free(9)
okay bye bestie π«Ά this page comes from source/version ./net/sunrpc, dated October 2026, and it's rpc_malloc(9) out here. stay allocated, stay slay π
β¨
π¦ 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