HomeFreeBSD

poll: use fget_unlocked or fget_only_user when feasible

Description

poll: use fget_unlocked or fget_only_user when feasible

This follows select by eleminating the use of filedesc lock.
This is a win for single-threaded processes and a mixed bag for others
as at small concurrency it is faster to take the lock instead of
refing/unrefing each file descriptor.

Nonetheless, removal of shared lock usage is a step towards a
mtx-protected fd table.

(cherry picked from commit 45e1f8541428c19f63dba65d78a8d138e1bc6915)

Details

Provenance
mjgAuthored on Jan 28 2021, 11:52 PM
Parents
rG233225ef7d56: select: employ fget_only_user
Branches
Unknown
Tags
Unknown