Page MenuHomeFreeBSD

riscv: use counter(9) for pmap counters
AcceptedPublic

Authored by mhorne on Thu, Jun 27, 6:30 PM.
Tags
None
Referenced Files
F87374625: D45761.diff
Tue, Jul 2, 7:13 AM
F87315663: D45761.diff
Mon, Jul 1, 4:46 PM
Unknown Object (File)
Sun, Jun 30, 9:08 AM
Subscribers

Details

Reviewers
markj
br
alc
Group Reviewers
riscv
Summary

It is more natural for these values which are infrequently read, but may be frequently updated.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58378
Build 55266: arc lint + arc unit

Event Timeline

I was about to comment that other pmaps still use atomics for these counters, but it seems that amd64's also been using counter(9) for a while. I'm a bit skeptical that that's really necessary (except perhaps for p_failures), but it doesn't have much downside either. It would be nice to make at least arm64 consistent.

This revision is now accepted and ready to land.Sun, Jun 30, 3:50 PM

I was about to comment that other pmaps still use atomics for these counters, but it seems that amd64's also been using counter(9) for a while. I'm a bit skeptical that that's really necessary (except perhaps for p_failures), but it doesn't have much downside either. It would be nice to make at least arm64 consistent.

I share your skepticism for the L2 counters, but I see no real harm in this change. Similarly, I would have no objections to making the same change on arm64. On arm64, we are using counter(9) for 64KB pages, where the counts are typically two orders of magnitude larger.

Does anyone know if any real riscv hardware implements their extension that supports additional page sizes, particularly, 64KB?