oxidecomputer / oxidecomputer/opte

Want more dynamic kstat tooling

Open
#1,035 0 comments 0 reactions 0 assignees View on GitHub

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 name opte$n. This prevents us from defining named stats which XDE cares about on a per-port basis, but OPTE itself does not know about.
  • Allow us to make use of the ks_update function 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.