1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_CLOCK_TYPES_H
3 #define _BCACHEFS_CLOCK_TYPES_H
7 #define NR_IO_TIMERS (BCH_SB_MEMBERS_MAX * 3)
10 * Clocks/timers in units of sectors of IO:
12 * Note - they use percpu batching, so they're only approximate.
16 typedef void (*io_timer_fn)(struct io_timer *);
24 /* Amount to buffer up on a percpu counter */
25 #define IO_CLOCK_PCPU_SECTORS 128
27 typedef DEFINE_MIN_HEAP(struct io_timer *, io_timer_heap) io_timer_heap;
31 u16 __percpu *pcpu_buf;
34 spinlock_t timer_lock;
38 #endif /* _BCACHEFS_CLOCK_TYPES_H */