oxidecomputer / oxidecomputer/opte
Want more dynamic kstat tooling
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Description
Our kstat framework today has a few shortcomings I bumped into while writing #1033. It would be useful if we had some abstractions which:
- Allow us to attach one or more named kstat fields to an existing (installed) named kstat, assuming no others of the same name are registered.
- Part of this is down to namespacing: when we create a
Port, it takes the nameopte$n. This prevents us from defining named stats which XDE cares about on a per-port basis, but OPTE itself does not know about.
- Part of this is down to namespacing: when we create a
- Allow us to make use of the
ks_updatefunction pointer.- This would allow us to hold e.g., a single source of truth for counters and gauges in #744.
- This would also allow us to express some disaggregation of stats at runtime: a kstat might be filled out when needed based on sharded state, for instance.
- Make use of other classes of kstat, non-virtual storage, etc. when appropriate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the kstat framework and the context in issues #1033 and #744. Define the required abstractions for attaching named fields, using ks_update, and supporting other kstat storage classes; done means these capabilities are implemented without conflicting registered names and are covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100