From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751979AbdH3Cbl (ORCPT ); Tue, 29 Aug 2017 22:31:41 -0400 Received: from smtprelay0017.hostedemail.com ([216.40.44.17]:44291 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751314AbdH3Cbk (ORCPT ); Tue, 29 Aug 2017 22:31:40 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3874:4321:5007:6742:10004:10400:10848:11026:11232:11658:11914:12296:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21088:21433:21627:30054:30060:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: jump35_2b537196fce3b X-Filterd-Recvd-Size: 2374 Message-ID: <1504060296.2786.8.camel@perches.com> Subject: Re: printk: what is going on with additional newlines? From: Joe Perches To: Sergey Senozhatsky Cc: Steven Rostedt , Linus Torvalds , Pavel Machek , Sergey Senozhatsky , Petr Mladek , Jan Kara , Andrew Morton , Jiri Slaby , Andreas Mohr , Tetsuo Handa , Linux Kernel Mailing List Date: Tue, 29 Aug 2017 19:31:36 -0700 In-Reply-To: <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> <20170830022528.GA17968@jagdpanzerIV.localdomain> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.