New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libbpf: switch libbpf_num_possible_cpus() implementation to simpler sysconf(_SC_NPROCESSORS_CONF) call #383
Comments
@anakryiko Can I take a stab at it ? |
Sure! Just keep in mind that libbpf changes have to go through kernel tree (bpf-next in this case), so please submit the patch to bpf@vger.kernel.org. See https://kernelnewbies.org/FirstKernelPatch and https://www.kernel.org/doc/html/latest/bpf/bpf_devel_QA.html if it will be your first kernel patch submission. |
One point, since Something like this. |
Let's not split discussion into two parts. Replied on mailing list. |
Simplify libbpf_num_possible_cpus by using sysconf(_SC_NPROCESSORS_CONF) instead of parsing a file. This patch is a part ([0]) of libbpf-1.0 milestone. [0] Closes: libbpf/libbpf#383 Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Simplify libbpf_num_possible_cpus by using sysconf(_SC_NPROCESSORS_CONF) instead of parsing a file. This patch is a part ([0]) of libbpf-1.0 milestone. [0] Closes: libbpf/libbpf#383 Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Simplify libbpf_num_possible_cpus by using sysconf(_SC_NPROCESSORS_CONF) instead of parsing a file. This patch is a part ([0]) of libbpf-1.0 milestone. [0] Closes: libbpf/libbpf#383 Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Simplify libbpf_num_possible_cpus by using sysconf(_SC_NPROCESSORS_CONF) instead of parsing a file. This patch is a part ([0]) of libbpf-1.0 milestone. [0] Closes: libbpf/libbpf#383 Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Simplify libbpf_num_possible_cpus by using sysconf(_SC_NPROCESSORS_CONF) instead of parsing a file. This patch is a part ([0]) of libbpf-1.0 milestone. [0] Closes: libbpf/libbpf#383 Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
@anakryiko Should we probably close this issue ? |
We are not going to do that. https://lore.kernel.org/bpf/ef0f23d0-456a-70b0-1ef9-2615a5528278@iogearbox.net/ for explanation of why not. |
There is no need to parse files. We need to double-check, but there is probably also no way that sysconf() can fail, which makes the API use simpler.
The text was updated successfully, but these errors were encountered: