diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-01 14:21:01 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-04 13:47:54 -0400 |
commit | d5e73ca148dc8ceb9c2125f4817674a2f5c7df60 (patch) | |
tree | e0e788aa40f9bd0771a3a00a204a673ff7192005 /fs/bcachefs/util.h | |
parent | fc837b568a5dea0215ea5c5ce271eb3c1c70b956 (diff) |
bcachefs: Don't promote when target is congestedbcachefs-v4.15
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r-- | fs/bcachefs/util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 97e4e6d00a37..7c7264f4f595 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -372,6 +372,9 @@ ssize_t bch2_scnprint_flag_list(char *, size_t, const char * const[], u64); u64 bch2_read_flag_list(char *, const char * const[]); #define NR_QUANTILES 15 +#define QUANTILE_IDX(i) inorder_to_eytzinger0(i, NR_QUANTILES) +#define QUANTILE_FIRST eytzinger0_first(NR_QUANTILES) +#define QUANTILE_LAST eytzinger0_last(NR_QUANTILES) struct quantiles { struct quantile_entry { @@ -401,7 +404,13 @@ struct time_stats { struct time_stat_buffer __percpu *buffer; }; -void bch2_time_stats_update(struct time_stats *stats, u64 time); +void __bch2_time_stats_update(struct time_stats *stats, u64, u64); + +static inline void bch2_time_stats_update(struct time_stats *stats, u64 start) +{ + __bch2_time_stats_update(stats, start, local_clock()); +} + size_t bch2_time_stats_print(struct time_stats *, char *, size_t); void bch2_time_stats_exit(struct time_stats *); |