freebsd-skq/sys/dev
Jonathan T. Looney a39249680f Fix hwpmc "stalled" behavior
Currently, there is a single pm_stalled flag that tracks whether a
performance monitor was "stalled" due to insufficent ring buffer
space for samples. However, because the same performance monitor
can run on multiple processes or threads at the same time, a single
pm_stalled flag that impacts them all seems insufficient.

In particular, you can hit corner cases where the code fails to stop
performance monitors during a context switch out, because it thinks
the performance monitor is already stopped. However, in reality,
it may be that only the monitor running on a different CPU was stalled.

This patch attempts to fix that behavior by tracking on a per-CPU basis
whether a PM desires to run and whether it is "stalled". This lets the
code make better decisions about when to stop PMs and when to try to
restart them. Ideally, we should avoid the case where the code fails
to stop a PM during a context switch out.

Sponsored by:	Juniper Networks
Reviewed by:	jhb
Approved by:	gnn (mentor)
Differential Revision:	https://reviews.freebsd.org/D4124
2015-11-14 01:40:12 +00:00
..
aac Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
aacraid Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
acpi_support Fix previous commit (r284357) 2015-06-13 22:29:43 +00:00
acpica Disable suspend when we're shutting down. This solves the "tell FreeBSD 2015-10-01 10:52:26 +00:00
adb
adlink
advansys Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
ae
age
agp
aha Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
ahb Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
ahci Allow AHCI driver attach to all known chips reporting RAID class. 2015-09-22 15:06:26 +00:00
aic
aic7xxx aic7xxx: Do not support device IDs 0x8081, 0x8088 and 0x8089 to avoid 2015-06-05 11:37:54 +00:00
alc
ale
alpm
altera CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
amdpm
amdsbwd
amdsmb
amdtemp
amr Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
an
arcmsr
asmc
ata Pass proper device to pci_read_config(). 2015-10-21 17:27:43 +00:00
ath Fix kernel build, broken in r290612 2015-11-09 20:22:59 +00:00
atkbdc Synaptics: fix a problem with trackpoint passthrough. 2015-06-19 00:10:30 +00:00
auxio
bce Correct a typo. 2015-02-24 01:00:46 +00:00
beri Allow BERI virtio-platform code to operate with no PIO devices specified. 2015-07-03 14:27:28 +00:00
bfe
bge bge(4): Small memory leak 2015-03-08 19:55:46 +00:00
bktr
bm
buslogic Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
bvm
bwi net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). 2015-10-12 04:55:20 +00:00
bwn net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). 2015-10-12 04:55:20 +00:00
bxe Add support for reading device temperature 2015-10-12 20:21:17 +00:00
cadence Use the new ifnet API. Also, allocate bus_dma_maps as needed instead of 2015-03-09 22:39:58 +00:00
cardbus On my Lenovo T400, a Atheros 2413 has a problem powering up 2015-02-18 05:53:04 +00:00
cas
ce CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
cesa
cfe
cfi
ciss r249170 was just plain wrong. The effect of the change is to always 2015-09-03 17:46:57 +00:00
cm
cmx
coretemp
cp CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
cpuctl
cpufreq
cs
ct Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
ctau CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
cx CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
cxgb Rename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is a 2015-10-22 09:50:45 +00:00
cxgbe cxgbe/t4_tom: add a knob to the default configuration file to tune 2015-11-10 02:29:19 +00:00
cy
cyapa Allow building a kernel with baked in ig4, isl and cyapa drivers. 2015-08-19 09:49:29 +00:00
dc
dcons CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
de
digi
dpms
dpt Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
drm Instead of defining the actualy user and group id in the drmP.h files 2015-08-11 16:51:44 +00:00
drm2 drm/i915: Reduce diff with Linux 3.8 2015-11-08 19:29:34 +00:00
dwc Fix the build by adding the alternate descriptors and MII clock defines. 2015-09-20 14:28:06 +00:00
e1000 Add support for SCTP checksum offloading for the 82580 controller 2015-11-10 10:55:57 +00:00
ed Unlock the main lock before returning rather than after to eliminate 2015-03-01 21:41:33 +00:00
eisa
en
ep
esp
et
etherswitch Introduce e6000sw etherswitch support 2015-10-25 22:14:04 +00:00
ex
exca
fatm
fb Add support for USB display link adapters to the FB and VT drivers. 2015-03-07 20:45:15 +00:00
fdc
fdt Create a RouterBoard platform and use it to create a flash map 2015-08-22 05:50:18 +00:00
fe MFi386: r278165 2015-06-27 09:01:49 +00:00
ffec
filemon Remove unneeded mutex.h include, missed in r287155. 2015-11-04 22:49:34 +00:00
firewire
flash Add support for s25fl256s. I /think/ it's a 32mb NOR flash part. 2015-11-05 03:13:10 +00:00
fxp
gem
glxiic
glxsb Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
gpio Fix the use of plural in two cases that I missed on r285784. 2015-08-18 21:37:14 +00:00
gxemul CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
hatm
hifn Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
hme
hpt27xx Update vendor driver to 1.2.7. This update improves driver reliability and 2015-06-23 17:26:16 +00:00
hptiop
hptmv hptmv(4): Fix broken sysctl(9) API assumptions 2015-11-07 23:05:23 +00:00
hptnr Merge changes from vendor driver 1.1.4: 2015-06-25 06:15:08 +00:00
hptrr
hwpmc Fix hwpmc "stalled" behavior 2015-11-14 01:40:12 +00:00
hyperv Do not enable UDP checksum offloading when running on the Hyper-V on 2015-07-22 05:05:01 +00:00
ic This should have been GC'd 6 years ago when ar(4) was removed. 2015-02-17 05:07:38 +00:00
ichiic Allow building a kernel with baked in ig4, isl and cyapa drivers. 2015-08-19 09:49:29 +00:00
ichsmb ichsmb: add Intel Wellsburg device ID. 2015-06-10 22:39:10 +00:00
ichwd Add ichwd TCO version 3 support (Bay Trail / Rangeley...) 2015-08-18 14:54:29 +00:00
ida Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
ie
if_ndis net80211: drop redundant 3rd parameter from iv_key_set(). 2015-10-03 21:48:27 +00:00
iicbus Add FDT compatibility to the icee driver. 2015-10-22 01:04:31 +00:00
iir Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
intpm
io
ioat ioat: Handle channel-fatal HW errors safely 2015-10-31 20:38:06 +00:00
ipmi Remove support for FreeBSD < 602110. 2015-08-30 08:48:31 +00:00
ips
ipw net80211 & wireless drivers: remove duplicate defines (noop) 2015-09-22 02:44:59 +00:00
isci isci: check return value of pci_alloc_msix() 2015-09-08 16:05:18 +00:00
iscsi Rework the way iSCSI initiator handles system shutdown. This fixes 2015-08-03 11:57:11 +00:00
iscsi_initiator Use sysctl_handle_string() and the sbuf printf routines instead of large 2015-03-14 22:32:15 +00:00
isl Allow building a kernel with baked in ig4, isl and cyapa drivers. 2015-08-19 09:49:29 +00:00
ismt
isp Rework r290504. 2015-11-07 19:33:57 +00:00
ispfw Remove residual verbosity. 2015-10-22 15:13:47 +00:00
iwi net80211: WME callback cleanup in various drivers 2015-11-05 17:58:18 +00:00
iwm Fix IEEE80211_ADDR_COPY() usage. 2015-10-22 01:36:16 +00:00
iwn iwn(4): various simple fixes 2015-11-05 22:44:36 +00:00
ixgb
ixgbe Add support for sysctl knobs to live tune the per interrupt rx/tx packet 2015-10-13 17:34:18 +00:00
ixl Fix ixl debug sysctls panic 2015-11-12 09:45:35 +00:00
jme
joy
kbd
kbdmux Revert r281889: 2015-04-29 20:08:03 +00:00
ksyms
le
led This implements default-state support as described in: 2015-05-24 07:45:42 +00:00
lge
lmc Remove compat code for pre-FreeBSD 7 systems. 2015-02-17 05:10:41 +00:00
malo net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). 2015-10-12 04:55:20 +00:00
mbox
mc146818
mca
mcd
md s/as/at/ in previous commit. 2015-08-13 19:12:55 +00:00
mem
mfi Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can 2015-06-09 15:51:11 +00:00
mge Improve style in mge driver 2015-10-25 22:20:13 +00:00
mii Add more BCM gigabit PHYs 2015-09-04 17:48:19 +00:00
mk48txx
mlx Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
mlx5 Compile fix for 32-bit platforms: 2015-11-12 09:52:37 +00:00
mly Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
mmc Add support for the DesignWare MMC hardware in the HiSilicon hi6220. This 2015-09-01 16:25:12 +00:00
mn
mpr Remove _FreeBSD_version check for something that was only an issue with 2015-10-16 17:56:43 +00:00
mps Revert an extra hunk that crept into the last commit. 2015-10-16 20:18:12 +00:00
mpt - In mpt_send_handshake_cmd(), use bus_space_write_stream_4(9) for writing 2015-07-24 16:00:35 +00:00
mrsas Counter part of mfi driver commit in mrsas 2015-06-26 12:00:51 +00:00
mse
msk Set DMA alignment constraint of status, TX and RX LEs(List Elements 2015-08-28 01:32:42 +00:00
mvs Reduce priority of ATA/SATA drivers. 2015-03-23 19:47:52 +00:00
mwl net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). 2015-10-12 04:55:20 +00:00
mxge Move zlib.c from net to libkern. 2015-04-22 14:38:58 +00:00
my
nand Remove one more that crept in unnecessarily from previous commit. 2015-08-05 01:52:52 +00:00
ncr
ncv
netfpga10g/nf10bmac
netmap Don't call enable_all_rings if the adapter has been freed. 2015-09-07 23:16:39 +00:00
nfe
nfsmb
nge
nmdm
nsp
ntb if_ntb: Clear the right QP in the free bitmap 2015-11-14 01:23:13 +00:00
null
nvd nvd, nvme: report stripesize through GEOM disk layer 2015-10-30 16:35:18 +00:00
nvme nvd, nvme: report stripesize through GEOM disk layer 2015-10-30 16:35:18 +00:00
nvram
nvram2env
nxge Fix what looks like a consistent copy&paste error. 2015-09-27 12:19:36 +00:00
oce CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
ofw Improve r290373, do a runtime check rather than a compile time switch. I 2015-11-08 21:06:51 +00:00
otus otus(4) - add flags for RX filter, configuration and sniffer. 2015-11-06 03:09:26 +00:00
ow Simply to appease gcc's warnings. 2015-08-28 02:29:31 +00:00
patm CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
pbio
pccard
pccbb We're waiting on a struct proc *, not a struct thread *. Fix a 2015-08-21 21:47:29 +00:00
pcf Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. 2015-10-09 22:49:50 +00:00
pci Add a new helper function for PCI devices to locate the upstream 2015-11-05 21:27:25 +00:00
pcn
pdq
pms Don't forget to check the vendor when probing. Also, there's no need 2015-08-02 16:26:41 +00:00
powermac_nvram
ppbus
ppc
proto Check the sync operation. 2015-07-28 04:54:05 +00:00
psci Start to support PSCI 1.0. For all the functions we currently support this 2015-08-11 13:42:58 +00:00
pst
pty
puc
qlxgb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
qlxgbe ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE 2015-10-20 17:27:11 +00:00
qlxge CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
quicc
ral Remove the static function declaration. 2015-10-29 04:51:27 +00:00
random Fix printf-like formats for KASSERT. 2015-10-05 10:45:52 +00:00
rc
rccgpio Fix off-by-one bugs. 2015-09-07 21:59:11 +00:00
re - Although it doesn't make a whole lot of sense to enable RX and TX 2015-11-09 00:19:04 +00:00
rl - Although it doesn't make a whole lot of sense to enable RX and TX 2015-11-09 00:19:04 +00:00
rndtest Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
rp
rt
safe Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
sbni
scc
scd
sdhci Add support for the BCM57765 card reader. 2015-10-15 04:22:56 +00:00
sec
sf
sfxge sfxge: added fallbacks for pre 4.2.1 firmware support 2015-07-22 16:25:18 +00:00
sge
si
siba
siis Reduce priority of ATA/SATA drivers. 2015-03-23 19:47:52 +00:00
sio
sis
sk
smbus Expand SMBUS API to add smbus_trans() function. 2015-04-25 16:15:01 +00:00
smc o Correct the calculation how many pages we need 2015-02-13 11:13:08 +00:00
sn
snc
snp
sound - Plugging a memory leak when malloc() failed during initialisation; 2015-10-24 19:40:03 +00:00
speaker
spibus Add copyright statement I should have had on these files in 2006, 2015-02-18 14:33:33 +00:00
ste
stg
stge
streams fd: remove filedesc argument from fdclose 2015-04-11 15:40:28 +00:00
sym Add the arm64 define. 2015-10-08 17:32:17 +00:00
syscons Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
tdfx
terasic
ti Fix r284722, by making it actually compile. 2015-06-23 06:59:46 +00:00
tl
tpm
trm Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
tsec
twa CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
twe Remove MAXBSIZE use from drivers where it has nothing to do. 2015-03-22 16:10:28 +00:00
tws CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
tx
txp
uart Add ID for Intel Panther Point KT Controller 2015-09-13 12:08:25 +00:00
ubsec Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
usb urtwn(4): add IBSS mode support 2015-11-10 12:52:26 +00:00
utopia
vge
viapm
viawd
videomode Add hskew field to struct videomode. It is required by some controllers 2015-06-18 00:22:14 +00:00
virtio Lower the compiler warning: unused-but-set-variable. 2015-09-03 06:53:17 +00:00
vkbd
vmware/vmxnet3
vnic Mark the thunder_mdio_fdt driver as early, the bgx needs it to exist so it 2015-11-06 14:40:51 +00:00
vr
vt vt_cpulogos: Resize all terms/windows when tearing down logos 2015-08-21 15:21:56 +00:00
vte
vx
vxge
watchdog CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
wb
wbwd Revert r279933; this is going to be fixed in sbuf instead. 2015-03-14 13:02:08 +00:00
wds
wi net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). 2015-10-12 04:55:20 +00:00
wl
wpi Remove BUS_DMA_NOWAIT from bus_dma_tag_create() invocations as it's 2015-10-21 06:23:57 +00:00
wtap wtap: remove some obsolete radiotap(9) code 2015-10-22 15:20:33 +00:00
xe
xen xen-blkfront: add support for unmapped IO 2015-11-09 12:22:44 +00:00
xl