Make sysctl_kern_proc_umask execute fast path when requested pid in curproc->p_pid or 0, avoiding unnecessary locking. Update libc consumer to skip calling getpid().
Sponsored by: Mysterious Code Ltd.
Differential D12972
sysctl_kern_proc_umask: fast path when operating on curproc kaktus on Nov 6 2017, 1:45 PM. Authored by Tags None Referenced Files
Details Make sysctl_kern_proc_umask execute fast path when requested pid in curproc->p_pid or 0, avoiding unnecessary locking. Update libc consumer to skip calling getpid(). Sponsored by: Mysterious Code Ltd. rebuild and reinstall kernel and libc, run program using KERN_PROC_UMASK oid, ie. procstat -s pid, observe UMASK field.
Diff Detail
Event TimelineComment Actions For consistency this should also remove SLOCK/SUNLOCK in the lookup case, otherwise LGTM. Comment Actions In such case I'm stopping the tests (large poudriere builds) until fixed version is submitted.
|