Re: [PATCH 00/13] Introduce seqnum_ops

From: Matthew Wilcox
Date: Wed Nov 11 2020 - 11:42:20 EST


On Wed, Nov 11, 2020 at 09:03:20AM -0700, Shuah Khan wrote:
> On 11/10/20 9:33 PM, Matthew Wilcox wrote:
> > On Tue, Nov 10, 2020 at 12:53:26PM -0700, Shuah Khan wrote:
> > > There are a number of atomic_t usages in the kernel where atomic_t api
> > > is used strictly for counting sequence numbers and other statistical
> > > counters and not for managing object lifetime.
> >
> > We already have something in Linux called a sequence counter, and it's
> > different from this. ID counter? instance number? monotonic_t? stat_t?
> >
>
> No results for monotonic_t or stat_t. Can you give me a pointer to what
> your referring to.

We have a seqcount_t. We need to call this something different.
maybe we should call it stat_t (and for that usage, stat_add() as well
as stat_inc() is a legitimate API to have).