HomeFreeBSD

hwpmc: limit wait for user callchain collection to 1 tick

Description

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

Details

Provenance
mmacyAuthored on
Parents
rS340148: e1000: Don't use 9k jumbo clusters
Branches
Unknown
Tags
Unknown