Lines Matching +full:lock +full:- +full:latency +full:- +full:ns

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * bch2_time_stats - collect statistics on events that have a duration, with nicely
6 * - percpu buffering of event collection: cheap enough to shotgun
10 * - number of events
11 * - maximum event duration ever seen
12 * - sum of all event durations
13 * - average event duration, standard and weighted
14 * - standard deviation of event durations, standard and weighted
18 * deviation and weighted standard deviation, to give an efficient-to-compute
19 * view of current behaviour versus. average behaviour - "did this event source
22 * Particularly useful for tracking down latency issues.
41 const struct time_unit *bch2_pick_time_units(u64 ns);
44 * quantiles - do not use:
46 * Only enabled if bch2_time_stats->quantiles_enabled has been manually set - don't
71 spinlock_t lock;
100 return stats->have_quantiles
101 ? &container_of(stats, struct bch2_time_stats_quantiles, stats)->quantiles
109 * time_stats_update - collect a new event being tracked
111 * @stats - bch2_time_stats to update
112 * @start - start time of event, recorded with local_clock()
122 * track_event_change - track state change events
124 * @stats - bch2_time_stats to update
125 * @v - new state, true or false
132 if (v != !!stats->last_event_start) {
134 bch2_time_stats_update(stats, stats->last_event_start);
135 stats->last_event_start = 0;
137 stats->last_event_start = local_clock() ?: 1;
152 bch2_time_stats_exit(&statq->stats);
156 bch2_time_stats_init(&statq->stats);
157 statq->stats.have_quantiles = true;
158 memset(&statq->quantiles, 0, sizeof(statq->quantiles));