Page MenuHomeFreeBSD

Add counters to smr.
ClosedPublic

Authored by jeff on Feb 2 2020, 12:25 AM.

Details

Summary

These should eventually be per-smr I suspect but for now this is helpful.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jeff created this revision.Feb 2 2020, 12:25 AM
jeff edited the summary of this revision. (Show Details)Feb 2 2020, 12:26 AM
jeff added reviewers: rlibby, markj.
jeff set the repository for this revision to rS FreeBSD src repository.
rlibby accepted this revision.Feb 2 2020, 8:23 PM

Logic looks fine. I trust you've checked any performance effects.

In advance you count on entry, and then also on the slow path, whereas in poll you count either fast or slow. Did you mean to approach those differently?

sys/kern/subr_smr.c
168 ↗(On Diff #67646)

Should they be initialized with EARLY_COUNTER? Since it seems that UMA SMR is available after SI_SUB_VM.

This revision is now accepted and ready to land.Feb 2 2020, 8:23 PM
markj added inline comments.Feb 3 2020, 2:27 PM
sys/kern/subr_smr.c
39 ↗(On Diff #67646)

Sort includes while here?

316 ↗(On Diff #67646)

This and the call below can be counter_u64_add_protected() since you're in a critical section.

jeff added a comment.Feb 5 2020, 3:59 AM

Logic looks fine. I trust you've checked any performance effects.

In advance you count on entry, and then also on the slow path, whereas in poll you count either fast or slow. Did you mean to approach those differently?

It might make more sense to count all polls and then number of polls that scan. I will look at that.