[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 03/30] Lazy percpu counters
- To: Suren Baghdasaryan <surenb@xxxxxxxxxx>
- From: Mel Gorman <mgorman@xxxxxxx>
- Date: Wed, 31 Aug 2022 11:02:49 +0100
- Cc: akpm@xxxxxxxxxxxxxxxxxxxx, kent.overstreet@xxxxxxxxx, mhocko@xxxxxxxx, vbabka@xxxxxxx, hannes@xxxxxxxxxxx, roman.gushchin@xxxxxxxxx, dave@xxxxxxxxxxxx, willy@xxxxxxxxxxxxx, liam.howlett@xxxxxxxxxx, void@xxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx, juri.lelli@xxxxxxxxxx, ldufour@xxxxxxxxxxxxx, peterx@xxxxxxxxxx, david@xxxxxxxxxx, axboe@xxxxxxxxx, mcgrof@xxxxxxxxxx, masahiroy@xxxxxxxxxx, nathan@xxxxxxxxxx, changbin.du@xxxxxxxxx, ytcoode@xxxxxxxxx, vincent.guittot@xxxxxxxxxx, dietmar.eggemann@xxxxxxx, rostedt@xxxxxxxxxxx, bsegall@xxxxxxxxxx, bristot@xxxxxxxxxx, vschneid@xxxxxxxxxx, cl@xxxxxxxxx, penberg@xxxxxxxxxx, iamjoonsoo.kim@xxxxxxx, 42.hyeyoo@xxxxxxxxx, glider@xxxxxxxxxx, elver@xxxxxxxxxx, dvyukov@xxxxxxxxxx, shakeelb@xxxxxxxxxx, songmuchun@xxxxxxxxxxxxx, arnd@xxxxxxxx, jbaron@xxxxxxxxxx, rientjes@xxxxxxxxxx, minchan@xxxxxxxxxx, kaleshsingh@xxxxxxxxxx, kernel-team@xxxxxxxxxxx, linux-mm@xxxxxxxxx, iommu@xxxxxxxxxxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, io-uring@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, linux-modules@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- Delivery-date: Wed, 31 Aug 2022 10:03:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, Aug 30, 2022 at 02:48:52PM -0700, Suren Baghdasaryan wrote:
> From: Kent Overstreet <kent.overstreet@xxxxxxxxx>
>
> 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@xxxxxxxxx>
Why not use percpu_counter? It has a per-cpu counter that is synchronised
when a batch threshold (default 32) is exceeded and can explicitly sync
the counters when required assuming the synchronised count is only needed
when reading debugfs.
--
Mel Gorman
SUSE Labs
|