Page MenuHomeFreeBSD

Convert cryptostats to a counter_u64 array.
ClosedPublic

Authored by markj on Jun 26 2020, 2:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 7:25 AM
Unknown Object (File)
Dec 11 2023, 11:30 PM
Unknown Object (File)
Sep 7 2023, 4:25 AM
Unknown Object (File)
Sep 7 2023, 4:24 AM
Unknown Object (File)
Sep 7 2023, 4:23 AM
Unknown Object (File)
Sep 7 2023, 4:21 AM
Unknown Object (File)
Sep 6 2023, 9:49 AM
Unknown Object (File)
Sep 1 2023, 7:59 PM
Subscribers

Details

Summary

The global counters were not SMP-friendly. Use per-CPU counters
instead.

These counters are of dubious usefulness to begin with, but I think
having a framework to easily add new counters is useful, so let's keep
them for now.

Note: we are changing the sysctl ABI, but it has changed once in HEAD
already since 12 was branched. (It was renamed in r359374.)

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 31975
Build 29522: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jun 26 2020, 2:53 PM
markj created this revision.

I’m not keen on the struct <-> array coercion

sys/opencrypto/crypto.c
236

Sizeof mismatches the structure type

markj marked an inline comment as done.

Fix the internal counter array size.

In D25466#562261, @cem wrote:

I’m not keen on the struct <-> array coercion

For what it's worth, this is how all of the network stats are handled as well.

Internally we use an array of counter_u64's and the sysctl handler for COUNTER_U64_ARRAY fetches the value for each stat out of the array. So really we are just assuming that struct cryptostats can be treated as an array of uint64_t.

This revision is now accepted and ready to land.Jun 26 2020, 6:31 PM
This revision was automatically updated to reflect the committed changes.