Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1361735ybe; Fri, 6 Sep 2019 16:39:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrfGQheVQzM78sfaorZEFflvudHDIfHBboxMomqa01G+N8gyvPlJL4xjFzttbPWgGzt95V X-Received: by 2002:a17:902:9b83:: with SMTP id y3mr11258569plp.143.1567813197282; Fri, 06 Sep 2019 16:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567813197; cv=none; d=google.com; s=arc-20160816; b=S1q9aLTEoN7SRzck41y1L4hspgroB7fF77hfc60LTEYZxR93DBsnisjRpr7B3nQhyi 8X++e6MdiDNCVrRApiXCdJanIHe4MCPya+as4oa/0UWmGKwx3ho9E5VRh3WCkOxL14c3 h3weMpRFXZOXml24OP/KkdSkWkQ3Fh0pKgW0zheEK9p03SwiuY2THfv1uIEc2Ona6A5c C73nP6IveXquNiF8yeb5KOy2dE1SWgcT7H4b7vum2aUZVheo4aYeROoqKtdPFX5wBIHB B0NhucMSOG9FqT9tjr/IG9dzVH9zJPD1MBvnwaw32gBgegvQPnKQouwHFmR6af1ZrYOW j51w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=D/HG6FAe0exGWGzTJ22srAQwFpD3yW3x+QAvgFaCLfw=; b=Asd3sofPb/InDak587MRgI4USuOREwhAw7HKcIb+sgFfTCqiY9UO0bkwrJNexQhUVy 9cXx3jGN5TRFLnCKGyzMf6qKgA1iSCZmyz2Rvq/dmG/gyrZZZKFpplZGA0eJb18mAIxE 600EnpbLZ0DGHb2qEgirr1y3icw0iELR7S8iIZZn/FSqvPZQuBWUXuN+ygoN4RMmKzWm PdQTYgYbodoR8H/nWApWpPoxmTC4JfhFKfl/8slEOaaZ4FvT0B/SQjePfcMLV/c1aKJV fmCQCQzguyMJRiCbhRwzcgNAvOo/vL79SxqeM05mtAZZWDBBoLrkw5VWM+OU56EttfO9 VH9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Rq4NLRtM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c35si5455001pgm.51.2019.09.06.16.39.41; Fri, 06 Sep 2019 16:39:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Rq4NLRtM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394410AbfIFOWv (ORCPT + 99 others); Fri, 6 Sep 2019 10:22:51 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54640 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732187AbfIFOWu (ORCPT ); Fri, 6 Sep 2019 10:22:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=D/HG6FAe0exGWGzTJ22srAQwFpD3yW3x+QAvgFaCLfw=; b=Rq4NLRtMcwj+UYfuPe5nd9ZmX ZyMk7Cccv0vCpL0WovQeyVS+MzLJdTvbT0/0asMg3eOCux2Xk3Sq0zv3QQJrN/9p0KfwcnPDYFXJV OyVRtZioxR4wZc3IwbZOWUbmuS4zXL1DE4sm0C8wAl5hlnN5+34Hu5uHN1s2pqQK6lO+x7OH70qjG dbT4GPmiLIW3R1BqB0HblAHj2gKBJV5DddElzHvBYEZOCxqu6V2F3HKmRH/xXdzFcQiXWzeASwdJP IRUYuL060utfwDxgiamIZe/BzuhbiHiVJyYXSngAeEKo5d2GiwMpBWjguUqXDaIPp5Bv8p9y3/+NB MLbl1NQLw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i6F8G-0001JX-Uk; Fri, 06 Sep 2019 14:22:37 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A9197306023; Fri, 6 Sep 2019 16:21:57 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1B14E29E28408; Fri, 6 Sep 2019 16:22:35 +0200 (CEST) Date: Fri, 6 Sep 2019 16:22:35 +0200 From: Peter Zijlstra To: Petr Mladek Cc: Andrea Parri , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Brendan Higgins , John Ogness , Thomas Gleixner , Linus Torvalds , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v4 0/9] printk: new ringbuffer implementation Message-ID: <20190906142235.GY2386@hirez.programming.kicks-ass.net> References: <20190807222634.1723-1-john.ogness@linutronix.de> <20190904123531.GA2369@hirez.programming.kicks-ass.net> <20190905130513.4fru6yvjx73pjx7p@pathway.suse.cz> <20190905143118.GP2349@hirez.programming.kicks-ass.net> <20190906090627.GX2386@hirez.programming.kicks-ass.net> <20190906124211.2dionk2kzcslaotz@pathway.suse.cz> <20190906140126.GY2349@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190906140126.GY2349@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 06, 2019 at 04:01:26PM +0200, Peter Zijlstra wrote: > On Fri, Sep 06, 2019 at 02:42:11PM +0200, Petr Mladek wrote: > > 7. People would complain when continuous lines become less > > reliable. It might be most visible when mixing backtraces > > from all CPUs. Simple sorting by prefix will not make > > it readable. The historic way was to synchronize CPUs > > by a spin lock. But then the cpu_lock() could cause > > deadlock. > > Why? I'm running with that thing on, I've never seen a deadlock ever > because of it. In fact, i've gotten output that is plain impossible with > the current junk. > > The cpu-lock is inside the all-backtrace spinlock, not outside. And as I > said yesterday, only the lockless console has any wait-loops while > holding the cpu-lock. It _will_ make progress. Oooh, I think I see. So one solution would be to pass the NMI along in chain like. Send it to a single CPU at a time, when finished, send it to the next.