Commit c07cf0a68693 tried to ensure that the Linux-compatible
syscalls would not be used on FreeBSD, but something must have
changed between then and now because I can clearly see
sched_{get,set}affinity() being used instead of their cpuset_*
counterparts on FreeBSD 14.
Ensure that the BSD variants are always preferred.
Before that, fix them so that they accept either a PID or a TID.
The fact that this wasn't the case until now makes me suspect
that scenarios in which thread-level affinity is applied have
not been tested at all on the platform, because doing something
as simple as
<vcpu placement='static' cpuset='1-2'>1</vcpu>
is enough to prevent the VM from starting, and before FreeBSD
14 the Linux compatibility APIs shouldn't have been part of the
picture at all.
Andrea Bolognani (3):
util: Accept TIDs for virProcess{Get,Set}Affinity() on BSD
util: Prefer cpuset_{get,set}affinity() on BSD
util: Add debug print missing from BSD
src/util/virprocess.c | 112 +++++++++++++++++++++---------------------
1 file changed, 57 insertions(+), 55 deletions(-)
--
2.43.2