Page MenuHomeFreeBSD

cpuset: specify that we're printing a list of cpus, not a mask
AcceptedPublic

Authored by gallatin on May 26 2020, 3:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 6:18 AM
Unknown Object (File)
Nov 11 2023, 3:34 AM
Unknown Object (File)
Nov 9 2023, 3:35 AM
Unknown Object (File)
Nov 5 2023, 4:50 PM
Unknown Object (File)
Oct 13 2023, 5:40 PM
Unknown Object (File)
Oct 8 2023, 2:32 AM
Unknown Object (File)
Apr 25 2023, 7:12 PM
Unknown Object (File)
Apr 8 2023, 12:46 AM
Subscribers

Details

Summary

The output of cpuset(1) can be confusing, as it refers to a "mask" when printing a list of CPUs. This is especially confusing when printing the affinity of a thread which is bound to CPU 15, CPU 31, etc. It is easy to interpret such a number as a mask, and think that the thread can run on CPUs 0..3 when it is really bound to CPU 15. To remedy the confusion, clarify that we're printing a list, not a bitmask.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 31316

Event Timeline

should cpu be uppercased: CPU list?

This revision is now accepted and ready to land.May 26 2020, 3:43 PM

I'm on board with the general idea. The manual page sometimes calls it a CPU list as well.

jhb added inline comments.
usr.bin/cpuset/cpuset.c
253

I would probably go with "CPU" over "cpu", but that's just a nit.