]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
hwpmc: limit wait for user callchain collection to 1 tick
authormmacy <mmacy@FreeBSD.org>
Mon, 5 Nov 2018 08:11:16 +0000 (08:11 +0000)
committermmacy <mmacy@FreeBSD.org>
Mon, 5 Nov 2018 08:11:16 +0000 (08:11 +0000)
commitd843b0f4abd4782caf9abffd5f7628b51d65d541
tree4788b532cf44fc67ff7776c8a84cafe109a50026
parentbecdce6176f2d38315e89a9221537893adbb4f35
hwpmc: limit wait for user callchain collection to 1 tick

The hwpmc pcpu sample buffer is prone to head of line blocking
when waiting for user process to return to user space and
collect a pending callchain. If more than one tick has elapsed
between the time the sample entry was marked for collection and
the time that the hardclock pmc handler runs to copy the records
to a larger temporary buffer, mark the sample entry as not in
use.

This changes reduces the number of samples marked as not valid
when collecting under load from ~99.5% to 5-20%.

Reported by: mjg@
MFC after: 3 days
sys/dev/hwpmc/hwpmc_mod.c