find_cpu_id_range(9)
π find_cpu_id_range(9) π
okay so bestie, this is a page from the Kernel API Manual and honestly? it's a little guy with a big job. let's get into it β¨
πΈ NAME πΈ
find_cpu_id_range β literally goes and finds you a linear range of @nthreads free CPU ids. that's the whole vibe. π
β¨ SYNOPSIS β¨
int find_cpu_id_range (unsigned int nthreads , int assigned_node ,
cpumask_var_t *cpu_mask );
like. look at that signature. so clean. so iconic. π
π«Ά ARGUMENTS π«Ά
nthreadsβ the number of threads (cpu ids) you're asking for. it's anunsigned int, so no funny business with negatives, mmkay? πassigned_nodeβ the node it belongs to, orNUMA_NO_NODEif free ids from any node can be peeked. yes bestie, you heard that right, you can just say "anywhere, idc" and it will go look around πβ¨cpu_maskβ the returned CPU mask. this is the output, it's giving "here's your results, bestie" π
π DESCRIPTION π
Returns 0 on success. that's it. that's the description. no cap, it's a short one β but it's doing the most important thing and we respect it π«‘π
ngl, if you were hoping for a novel here, there isn't one. the function succeeds and gives you 0. periodt.
π₯ SEE ALSO π₯
- Kernel file
./arch/powerpc/platforms/pseries/hotplug-cpu.cβ go read it, iykyk π¦
and that's the whole page!! mwah π
this cutie lives under ./arch/powerpc/platforms/pseries and the docs are dated October 2026 β so go forth, find those free CPU ids, and 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