Repository navigation
bcache: Fix btree_read_average_duration_seconds unit - #3828
Merged
SuperQ merged 2 commits intoSep 25, 2026
Merged
Conversation
The kernel reports btree_read_average_duration_us in microseconds, but the value was scaled as nanoseconds, making the metric 1000x too small. Signed-off-by: Finomosec <[email protected]>
SuperQ
approved these changes
Sep 25, 2026
SuperQ
left a comment
Member
There was a problem hiding this comment.
Thanks!
I also created prometheus/procfs#871 to fix the upstream library struct field.
Merged
SuperQ
added a commit
that referenced
this pull request
Nov 18, 2026
The behavior of `node_cpu_frequency_hertz` has changed. There are two different sources of data for this metric. One from the `cpu` collector, one from the `cpufreq` collector. Due to historical feature migrations the `cpufreq` collector shares the same subsystem as the `cpu` collector. This caused conflicting data behavior. An attempt to fix this was introduced in #3318. This behavior has been reverted to the previous behavior in #3795. A new flag (`--collector.cpufreq.enable-cpufreq-prefix`) has been introduced that gives the `cpufreq` a dedicated metric name subsystem (`node_cpufreq_...`). This will likely be the default in v2. * [CHANGE] netstat: Use procfs parsers for netstat, snmp and snmp6 #3796 * [CHANGE] edac: Fix no data results #3863 * [CHANGE] nvme: Deprecate metric nvme_namespace_capacity_bytes #3899 * [FEATURE] Add tainted collector for /proc/sys/kernel/tainted #3745 * [FEATURE] Add resctrl collector #3797 * [ENHANCEMENT] netstat: Add new FreeBSD metrics #3334 * [ENHANCEMENT] Add `chip` label to DRM metrics #3572 * [ENHANCEMENT] diskstats: add device-mapper backing device info metric #3676 * [ENHANCEMENT] textfile: support UTF-8 metric and label names #3729 * [ENHANCEMENT] ksmd: add general_profit metric #3778 #3894 * [BUGFIX] edac: Fix printf-style formatting in slog call #3759 * [BUGFIX] fibre_channel: fix crash when attempting to dereference invalid counters #3573 * [BUGFIX] thermal: Fix collecting Darwin temperatures without CPU power status #3767 * [BUGFIX] fibrechannel: Fix for ppc64le #3769 * [BUGFIX] cpu: Revert dup cpu frequency, add node_cpufreq flag #3795 * [BUGFIX] infiniband: skip sysfs reads for excluded devices #3824 * [BUGFIX] bcache: Fix btree_read_average_duration_seconds unit #3828 Signed-off-by: Ben Kochie <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@SuperQ
node_bcache_btree_read_average_duration_secondsis 1000x too small. The collector readsinternal/btree_read_average_duration_us, which the kernel reports in microseconds (sysfs_print_time_stats(&c->btree_read_time, btree_read, ms, us)indrivers/md/bcache/sysfs.c), but scales it with1e-9as if it were nanoseconds. The procfs field is namedBtreeReadAverageDurationNanoSeconds, which is probably where the mix-up came from.Example from a live system: sysfs shows
3660(3.66 ms), the metric reports3.66e-06(3.66 µs).This scales by
1e-6instead and updates the e2e fixtures (1305µs →0.001305s). Renaming the misleading procfs field would be a separate change in prometheus/procfs.