ep_loop_check_proc(9)
π ep_loop_check_proc(9) β the Kernel API Manual, bestie edition π
okay so real talk, this is one of those little kernel helpers that does SO much under the hood and nobody ever claps for it. it lives in the Kernel API Manual section 9, and today we're gonna make it make sense. no cap. π¦
β¨ NAME β¨
ep_loop_check_proc β bestie, this one's whole job is to verify that adding an epoll file @ep inside another epoll file does not create closed loops, and also to determine the depth of the subtree starting at @ep. it's giving bodyguard energy tbh. it's literally standing at the door like "nope, not you, you'd make a loop, go home". π
π₯
πΈ SYNOPSIS πΈ
int ep_loop_check_proc (struct ep_ctl_ctx *ctx , struct eventpoll *ep ,
int depth );
three args, one int coming back. she's compact, she's iconic, she's not here to waste your time. β
π§ ARGUMENTS π§
ctxβ Per-do_epoll_ctlscratch for the loop / path checks. lowkey the little notepad she scribbles on while she's doing the vibe check on your whole epoll setup. πepβ thestruct eventpollto be currently checked. this is the main character of the operation, the one getting inspected. πdepthβ Current depth of the path being checked. she's counting how deep down the tree she's wandered, fr fr. π«Ά
π RETURN π
here's the tea: she returns the depth of the subtree, OR a value bigger than EP_MAX_NESTS if we found a loop or went too deep. so if the number comes back looking suspiciously large, that's your sign β either somebody made a cycle (gross) or you just went too far down the rabbit hole (relatable honestly π).
π SEE ALSO π
- Kernel file
./fs/eventpoll.c busy_loop_ep_timeout(9)reverse_path_check(9)ep_poll(9)ep_loop_check(9)
go read those too, iykyk. β¨
and that's the whole page, no crumbs left behind π β this was ep_loop_check_proc(9) from ./fs, dated October 2026. now go forth and keep your epoll trees loop-free, bestie, you're literally built for this. πππ₯
π¦ 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