Commit Graph

18 Commits

Author SHA1 Message Date
Dmitry Chagin
f35093f8d6 Use Linux semantics for the thread affinity syscalls.
Linux has more tolerant checks of the user supplied cpuset_t's.

Minimum cpuset_t size that the Linux kernel permits in case of
getaffinity() is the maximum CPU id, present in the system / NBBY,
the maximum size is not limited.
For setaffinity(), Linux does not limit the size of the user-provided
cpuset_t, internally using only the meaningful part of the set, where
the upper bound is the maximum CPU id, present in the system, no larger
than the size of the kernel cpuset_t.
Unlike FreeBSD, Linux ignores high bits if set in the setaffinity(),
so clear it in the sched_setaffinity() and Linuxulator itself.

Reviewed by:		Pau Amma (man pages)
In collaboration with:	jhb
Differential revision:	https://reviews.freebsd.org/D34849
MFC after:		2 weeks
2022-05-11 10:36:01 +03:00
Enji Cooper
0c424c64f8 cpuset{,_getaffinity,_getdomain}.2: fix SEE ALSO
Sort by manpage section, then sort entries alphabetically.

This makes the manpages `make manlint` clean.

MFC after:	1 week
Sponsored by:	DellEMC Isilon
2020-12-11 01:52:27 +00:00
Gordon Bergling
3d265fce43 Fix a few mandoc issues
- skipping paragraph macro: Pp after Sh
- sections out of conventional order: Sh EXAMPLES
- whitespace at end of input line
- normalizing date format
2020-10-09 19:12:44 +00:00
Jeff Roberson
93f31533df Document new NUMA related syscalls and utility options.
Sponsored by:	Netflix, Dell/EMC Isilon
2018-03-24 23:58:44 +00:00
Allan Jude
f299c47b52 Allow cpuset_{get,set}affinity in capabilities mode
bhyve was recently sandboxed with capsicum, and needs to be able to
control the CPU sets of its vcpu threads

Reviewed by:	emaste, oshogbo, rwatson
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D10170
2017-05-24 00:58:30 +00:00
Eric van Gyzen
28e3357884 Improve errno documentation in pthread_create(3) and thr_new(2)
Add some missing errno values to thr_new(2) and pthread_create(3).
In particular, EDEADLK was not documented in the latter.
While I'm here, improve some English and cross-references.

Reviewed by:	kib
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D6663
2016-06-03 14:30:32 +00:00
Conrad Meyer
8b584e9d74 cpuset.9: Link to/from the new page
A follow-up to r289667.

Sponsored by:	EMC / Isilon Storage Division
2015-10-20 23:52:37 +00:00
Baptiste Daroussin
8fbf3d50e3 use .Mt to mark up email addresses consistently (part4)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:25:03 +00:00
Joel Dahl
cd088fc43a Remove cross-references to nonexistent CPU_SET(3) manpage.
Also fix cpu_getaffinity(2) document title.

PR:		176317
Submitted by:	brucec
2013-04-21 06:46:41 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Joel Dahl
41949a1ed5 Remove superfluous paragraph macro. 2012-03-25 12:13:24 +00:00
Glen Barber
416d1e6f23 Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 and
r212438, repectively.

Approved by:	keramida (mentor)
MFC after:	1 week
2010-09-12 14:04:05 +00:00
Glen Barber
cbd5df1c04 Add EINVAL to list of possible return values for cpuset_getaffinity(2).
PR:		149978
Submitted by:	gcooper
Patch by:	gcooper
Approved by:	keramida (mentor)
MFC after:	1 week
2010-09-10 23:15:05 +00:00
Xin LI
777f8cebf3 Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3).
Reviewed by:	davidxu
MFC after:	2 weeks
2010-01-09 12:31:11 +00:00
Bjoern A. Zeeb
413628a7e3 MFp4:
Bring in updated jail support from bz_jail branch.

This enhances the current jail implementation to permit multiple
addresses per jail. In addtion to IPv4, IPv6 is supported as well.
Due to updated checks it is even possible to have jails without
an IP address at all, which basically gives one a chroot with
restricted process view, no networking,..

SCTP support was updated and supports IPv6 in jails as well.

Cpuset support permits jails to be bound to specific processor
sets after creation.

Jails can have an unrestricted (no duplicate protection, etc.) name
in addition to the hostname. The jail name cannot be changed from
within a jail and is considered to be used for management purposes
or as audit-token in the future.

DDB 'show jails' command was added to aid debugging.

Proper compat support permits 32bit jail binaries to be used on 64bit
systems to manage jails. Also backward compatibility was preserved where
possible: for jail v1 syscalls, as well as with user space management
utilities.

Both jail as well as prison version were updated for the new features.
A gap was intentionally left as the intermediate versions had been
used by various patches floating around the last years.

Bump __FreeBSD_version for the afore mentioned and in kernel changes.

Special thanks to:
- Pawel Jakub Dawidek (pjd) for his multi-IPv4 patches
  and Olivier Houchard (cognet) for initial single-IPv6 patches.
- Jeff Roberson (jeff) and Randall Stewart (rrs) for their
  help, ideas and review on cpuset and SCTP support.
- Robert Watson (rwatson) for lots and lots of help, discussions,
  suggestions and review of most of the patch at various stages.
- John Baldwin (jhb) for his help.
- Simon L. Nielsen (simon) as early adopter testing changes
  on cluster machines as well as all the testers and people
  who provided feedback the last months on freebsd-jail and
  other channels.
- My employer, CK Software GmbH, for the support so I could work on this.

Reviewed by:	(see above)
MFC after:	3 months (this is just so that I get the mail)
X-MFC Before:   7.2-RELEASE if possible
2008-11-29 14:32:14 +00:00
John Baldwin
338b0cb957 Support for CPU sets is going to appear in 7.1 before 8.0.
MFC after:	3 days
2008-09-29 15:44:48 +00:00
Antoine Brodin
88ff5136d1 Document that you must include <sys/param.h> before <sys/cpuset.h>.
Approved by:	rwatson (mentor)
2008-04-20 15:51:56 +00:00
Jeff Roberson
d1317e00b8 - Add a man page for cpuset_getaffinity() and cpuset_setaffinity() and
hook it up to the build.

Reviewed by:	brueffer (skeleton and formatting assistance)
2008-03-29 10:26:29 +00:00