Skip to content
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

OpenBSD and NetBSD doesn't have the cpuset_* feature #1414

Open
rilysh opened this issue Jun 22, 2024 · 3 comments
Open

OpenBSD and NetBSD doesn't have the cpuset_* feature #1414

rilysh opened this issue Jun 22, 2024 · 3 comments
Labels

Comments

@rilysh
Copy link

rilysh commented Jun 22, 2024

Hi!

I was looking at the https://github.com/oneapi-src/oneTBB/blob/master/src/tbb/misc_ex.cpp file, and I noticed that a few several functions uses cpuset_*affinity() functions, but they're only available in FreeBSD. Neither OpenBSD or NetBSD seem to have these, and there seem to be no libc API to address this on OpenBSD. (NetBSD apparently have pthread_*affinity_*() and cpuset, https://man.netbsd.org/affinity.3 but I haven't dig further to this yet).

  1. https://man.openbsd.org/cpuset_getaffinity (empty)
  2. https://man.netbsd.org/cpuset_getaffinity (empty)

I've also noticed a few syscalls, but starting from OpenBSD 7.5 direct syscalls aren't permitted. The syscall wrapper is also removed from the libc and kernel. (https://marc.info/?l=openbsd-tech&m=169841790407370&w=2)

I just found oneTBB right now, so I'm not sure how useful misc_ex file is. Moreover I haven't compiled it to these specified target systems.

@pavelkumbrasev
Copy link
Contributor

Hi @rilysh, misc_ex still in use and provides some platform specific functionality. I cannot comment on fullness of OpenBSD support in this specific part of functionality because BSDs are community supported platforms.
If you can test it on your side and provide a contribution with the improvement (if needed) we would be happy to help with it.

@nofuturre
Copy link

@rilysh is this issue still relevant?

@rilysh
Copy link
Author

rilysh commented Jul 12, 2024

@rilysh is this issue still relevant?

Yes.
Compilation on both systems (NetBSD 10 and OpenBSD 7.5) fails. I haven't think about patching this yet. I just reported this approximately three weeks ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants