summaryrefslogtreecommitdiff
path: root/lib/lazy-percpu-counter.c
AgeCommit message (Collapse)Author
2023-03-13Lazy percpu countersKent Overstreet
This patch adds lib/lazy-percpu-counter.c, which implements counters that start out as atomics, but lazily switch to percpu mode if the update rate crosses some threshold (arbitrarily set at 256 per second). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Suren Baghdasaryan <surenb@google.com>