get_next_path_min_latency(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ get_next_path_min_latency(9) ✨

okay so bestie, welcome to the get_next_path_min_latency(9) page β€” it's part of the Kernel API Manual and it's genuinely such a vibe once you get it, i promise 🫢


πŸ’– NAME πŸ’–

get_next_path_min_latency β€” returns the path with minimal latency. literally what it says on the tin, no cap ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct rtrs_clt_path * get_next_path_min_latency (struct path_it *it );

πŸŽ€ ARGUMENTS πŸŽ€

  • it β€” the path pointer, that's it, that's the whole argument 🫢

🌸 RETURN 🌸

it hands you back a path with the lowest latency β€” or NULL if all the paths are tried 😭


πŸ‘‘ DESCRIPTION πŸ‘‘

okay so first things first, the locking situation, do NOT skip this:

Locks: rcu_read_lock must be hold. like, must. this is not a suggestion, bestie πŸ’…

this one is related to MP_POLICY_MIN_LATENCY β€” iykyk πŸ”₯

here's the iconic part: this DOES skip an already-tried path. there's a skip-list that skips a path if that path has been tried but failed, which is honestly so real of it πŸ™ˆ

so the way it works is it'll try the minimum latency path, then the second minimum latency path, and so on and so on until it's done. and finally it returns NULL if all the paths are tried πŸ’€

and because of that, the caller MUST check whether the returned path is NULL and trigger the IO error. like, MUST must. not optional, not "i'll do it later", do it 🚨


🌈 SEE ALSO 🌈

the kernel file that lives at:

./drivers/infiniband/ulp/rtrs/rtrs-clt.c

and all of these absolute icons:


that's the whole page, slay πŸ’… this one lives in ./drivers/infiniband/ulp/rtrs and it's dated October 2026 β€” go forth and check for NULL, bestie, i'm obsessed with you for reading all the way down here πŸŽ€πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from