HomeFreeBSD

hwpmc: partially depessimize munmap handling if the module is not loaded

Description

hwpmc: partially depessimize munmap handling if the module is not loaded

HWPMC_HOOKS is enabled in GENERIC and triggers some work avoidable in the
common (module not loaded) case.

In particular this avoids permission checks + lock downgrade
singlethreaded and in cases were an executable mapping is found the pmc
sx lock is no longer bounced.

Note this is a band aid.

MFC after: 1 week

Details

Provenance
mjgAuthored on
Parents
rS312723: proc: perform a lockless check in sys_issetugid
Branches
Unknown
Tags
Unknown