HomeFreeBSD

proc: perform P_CONTROLT check on fork without SESS_LOCK

Description

proc: perform P_CONTROLT check on fork without SESS_LOCK

The flag is guarded by proc lock which is already held.

After tracing poudriere for over 4 hours like so:
dtrace -n 'fbt::do_fork:entry { @[curthread->td_proc->p_flag & 0x2] = count(); }':

2         15605151
0         20074116

Over 56% of cases did not have P_CONTROLT set and could have avoided the
lock.

This reduces hold time of the proctree lock.

Details

Provenance
mjgAuthored on Sep 25 2025, 11:50 AM
Parents
rGb0091036f724: psignal(3): document return values of sig2str() and str2sig
Branches
Unknown
Tags
Unknown