lkml.org 
[lkml]   [2017]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: printk: what is going on with additional newlines?
From
Date
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.


\
 
 \ /
  Last update: 2017-08-30 04:32    [W:0.110 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site