kernel - Remove SMP bottlenecks on uidinfo, descriptors, and lockf
* Use an eventcounter and the per-thread fd cache to fix
bottlenecks in checkfdclosed(). This will work well for
the vast majority of applications and test benches.
* Batch holdfp*() operations on kqueue collections when implementing
poll() and select(). This significant improves performance.
Full scaling not yet achieved, however.
* Increase copyin item batching from 8 to 32 for select() and poll().
* Give the uidinfo structure a pcpu array to hold the posixlocks
and openfiles count fields, with a rollup contained in the uidinfo
structure itself.
This removes numerous global bottlenecks related to open(),
close(), dup*(), and lockf operations (posixlocks count).
ui_openfiles will force a rollup on limit reached to be sure
that the limit was actually reached. ui_posixlocks stays fairly
loose. Each cpu rolls up generally only when the pcpu count exceeds
+32 or goes below -32.
* Give the proc structure a pcpu array for the same counts, in order
to properly support seteuid() and such.
* Replace P_ADVLOCK with a char field proc->p_advlock_flag, and
remove token operations around the field.
13 files changed: