[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1504060296.2786.8.camel@perches.com>
Date: Tue, 29 Aug 2017 19:31:36 -0700
From: Joe Perches <joe@...ches.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Pavel Machek <pavel@....cz>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Petr Mladek <pmladek@...e.com>, Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Slaby <jslaby@...e.com>, Andreas Mohr <andi@...as.de>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: printk: what is going on with additional newlines?
On Wed, 2017-08-30 at 11:25 +0900, Sergey Senozhatsky wrote:
> On (08/29/17 18:52), Joe Perches wrote:
> [..]
> > > We could simply add a seq_buf_printk() that is implemented in the printk
> > > proper, to parse the seq_buf buffer properly, and add the timestamps and
> > > such.
> >
> > No need. printk would already add timestamps.
>
> the idea is not to do printk() on that seq buffer at all, but to
> log_store(), atomically, seq buffer messages
>
> spin_lock(&logbuf_lock)
> while (offset < seq_buffer->len) {
> ...
> log_store(seq->buffer + offset);
> ...
> }
> spin_unlock(&logbuf_unlock)
Why?
What's wrong with a simple printk?
It'd still do a log_store.
Powered by blists - more mailing lists