[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2777285d9e224c509e10b8448844f19a@AcuMS.aculab.com>
Date: Sat, 15 Aug 2020 09:25:16 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Joe Perches' <joe@...ches.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
CC: Petr Mladek <pmladek@...e.com>,
John Ogness <john.ogness@...utronix.de>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Peter Zijlstra" <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: RE: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement
LOG_CONT handling
From: Joe Perches
> Sent: 15 August 2020 00:52
...
> > This is why I think any discussion that says "people should buffer
> > their lines themselves and we should get rid if pr_cont()" is
> > fundamentally broken.
> >
> > Don't go down that hole. I won't take it. It's wrong.
>
> I don't think it's wrong per se.
>
> It's reasonable to avoid pr_cont when appropriate.
>
> Trivial buffering, or adding and using YA vsprintf
> extension can avoid unnecessary message interleaving.
>
> For instance, I just sent this patch to allow removal
> of print_vma_addr and its use of pr_cont.
>
> https://lore.kernel.org/lkml/09f11651f0e913e159b955ac447cd8cadf36cb0d.camel@perches.com/
ISTM that is a bit complex for a printf format.
Even with the 'noinline_for_stack' it is going to
use a lot of stack - and error printfs are already likely
to be near the stack limit.
The recursion for %pV might also cause grief.
In that case formatting the data into an on-stack char[]
before the printf is probably the simplest solution.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists