From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751910AbdH3CXH (ORCPT ); Tue, 29 Aug 2017 22:23:07 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:37936 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdH3CXG (ORCPT ); Tue, 29 Aug 2017 22:23:06 -0400 Date: Wed, 30 Aug 2017 11:25:28 +0900 From: Sergey Senozhatsky To: Joe Perches Cc: Steven Rostedt , Sergey Senozhatsky , Linus Torvalds , Pavel Machek , Sergey Senozhatsky , Petr Mladek , Jan Kara , Andrew Morton , Jiri Slaby , Andreas Mohr , Tetsuo Handa , Linux Kernel Mailing List Subject: Re: printk: what is going on with additional newlines? Message-ID: <20170830022528.GA17968@jagdpanzerIV.localdomain> References: <20170828102830.GA403@jagdpanzerIV.localdomain> <20170828122109.GA532@jagdpanzerIV.localdomain> <20170828124634.GD492@amd> <20170829134048.GA437@jagdpanzerIV.localdomain> <20170829195013.5048dc42@gandalf.local.home> <20170830010348.GB654@jagdpanzerIV.localdomain> <20170829211046.74644c8a@gandalf.local.home> <1504057959.2786.4.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1504057959.2786.4.camel@perches.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -ss