]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r312724,r312901,r312902:
authormjg <mjg@FreeBSD.org>
Tue, 14 Mar 2017 20:43:04 +0000 (20:43 +0000)
committermjg <mjg@FreeBSD.org>
Tue, 14 Mar 2017 20:43:04 +0000 (20:43 +0000)
commit3edf8a9d08485cf11c17af11e7852d41f8edea23
tree3a52f54c3221a41c2827b86fcf9b8cfa4136dae9
parent57f28a25af7dd32fc8adea80c5ebb2b237cc86a6
MFC r312724,r312901,r312902:

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.

==

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

In particular this means the pmc sx lock is no longer taken when an
executable mapping succeeds.

==

hwpmc: annotate pmc_hook and pmc_intr as __read_mostly
sys/kern/kern_pmc.c
sys/kern/vfs_vnops.c
sys/sys/pmckern.h
sys/vm/vm_mmap.c