[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161116081354.GB1270@gmail.com>
Date: Wed, 16 Nov 2016 09:13:55 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Christoph Hellwig <hch@...radead.org>,
Peter Zijlstra <peterz@...radead.org>,
Kees Cook <keescook@...omium.org>,
Will Deacon <will.deacon@....com>, elena.reshetova@...el.com,
Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Anvin <hpa@...or.com>, dave@...gbits.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] printk, locking/atomics, kref: Introduce new %pAr and
%pAk format string options for atomic_t and 'struct kref'
* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Tue, Nov 15, 2016 at 12:37 AM, Ingo Molnar <mingo@...nel.org> wrote:
> > +atomic variables such atomic_t or struct kref:
> > +
> > + %pAr atomic_t count
> > + %pAk struct kref count
>
> Not a huge fan. That "r" makes sense to you ("raw" atomic), but it
> makes no sense to a user. An atomic isn't "raw" to anybody else. It's
> just an atomic.
So in the latestest patch this has evolved to:
%pAa - print the 'atomic_t' count in decimal
%pAk - print the 'struct kref' count in decimal
%pAr - print the 'refcount_t' count in decimal
... are you still hating it?
> Also, we have 'atomic64_t", which this doesn't cover at all.
We could use a somewhat logical letter for atomic64_t too:
%pAA - print the 'atomic64_t' count in decimal
... as 'A' is the bigger version of 'a', just like atomic64_t is the bigger
version of atomic_t! ;-)
> I'd suggest just %pA, %pA64, %pAkref or something. Which leaves us the
> choice to add more atomic versions later without having to make up
> random one-letter things that make no sense.
It's a bit more work, but we could do that too, if you still don't like the above
single letter abbreviations.
Thanks,
Ingo
Powered by blists - more mailing lists