Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbbFYSPL (ORCPT ); Thu, 25 Jun 2015 14:15:11 -0400 Received: from casper.infradead.org ([85.118.1.10]:46412 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751673AbbFYSPH (ORCPT ); Thu, 25 Jun 2015 14:15:07 -0400 Date: Thu, 25 Jun 2015 20:14:59 +0200 From: Peter Zijlstra To: Petr Mladek Cc: Steven Rostedt , linux-kernel@vger.kernel.org, jkosina@suse.cz, paulmck@linux.vnet.ibm.com, Ingo Molnar , Thomas Gleixner Subject: Re: [RFC][PATCH] printk: Fixup the nmi printk mess Message-ID: <20150625181459.GB3644@twins.programming.kicks-ass.net> References: <20150610125509.GO19282@twins.programming.kicks-ass.net> <20150610143155.GD9409@pathway.suse.cz> <20150610152917.GI3644@twins.programming.kicks-ass.net> <20150610192304.GY18673@twins.programming.kicks-ass.net> <20150611145547.GA3234@dhcp128.suse.cz> <20150612120037.GR3644@twins.programming.kicks-ass.net> <20150612142805.GI9409@pathway.suse.cz> <20150612153505.GJ9409@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150612153505.GJ9409@pathway.suse.cz> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 940 Lines: 22 On Fri, Jun 12, 2015 at 05:35:05PM +0200, Petr Mladek wrote: > I have got another idea. We already use a lock to synchronize > readers. It might be used to avoid the race and keep the global > flush(). > > I played with it, see below. It is based on 2nd Peter's patch > where I modified only struct nmi_seq_buf, __printk_nmi_flush(), > and vprintk_nmi(). > > It forces the reader to flush everything or nothing. It is less > effective than the previous code but much more simple. > > It seems to work but it is just a proof-of-concept. Also I think that > it would be possible to use the normal seq_buf in the end. Sorry, got side tracked. Yes this looks ok. Want to submit a proper patch? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/