Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4257688ybe; Mon, 9 Sep 2019 06:44:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSCj5W0Z/L2a/ykSdLvRVlJnDtwjEuQ1onpabLCxo84N9dvg5TCPviS1roX0YxQcT5nI49 X-Received: by 2002:a17:906:e2c4:: with SMTP id gr4mr19087906ejb.25.1568036698289; Mon, 09 Sep 2019 06:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568036698; cv=none; d=google.com; s=arc-20160816; b=Rxh91ExsUsMBCFMpJMAIE03VFWA79RY4WL7jjsDrWf38CXCscVnoK7KUZIojZfTbD0 VBkettqDcf8tkZPnYYODpXsquzgAn7E9iKQADFMHqXiqfHo6+UtOOnY4W0cbJMbnuSY4 PRJBqWuR6QG2Ab+HgonIMHdFWQjJhv1lGTvJ4ouUNgh/uy90tnjzUY23PbHdRfJJ0atc 8LJ7qFc87O64aTl9PMY3YWAGgekjRX1WqjEm4SDtJHcdGLMl+c+1Ovz8/k6d0x+j2DXZ 9zu7npVk4e7UdeO+1PwKC1iWvY5B5EYmeDEtb4QcQEjK/DX0emfLJrz26BJoqySb3brr Nn+Q== 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=P/awgzoK2k4GVGdBJaMhAEeA4IXyM1r5QKgABXCX0SM=; b=aMAHZMhNGl4/IJrO15OEN+DwfY4EdTn8SgEh6AWOFPbmeUHaQaHW2jF6HhBsH4ApSK 3PQ0rEwOcwjnTvDM015156qSJ29yI+mCwhG+vDwlG2Ujh2EPL9Tz6m3rWvY9mEOLGCQ4 H2yfC6Vf7Mx/woOF4CjFeaBvY7PFdFLxUxcnZRj9OyjCl4r15gG4mkSFBKNJubexRf8a KQXdtmJ+y5cwzt+yWMou/iyYJp/FoRtTvp1nDRVaAL4rdcJUQfoX0b2MKPxG5bp+gZy3 2Dq51LMFIWNzwl6c683LbRWfcHbuKWMX1vIzlNzaB3rjQkR1RGHsPcU6rJ3KLjDFUlCV M5bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=wtdqX5u3; 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 g40si8868519edg.397.2019.09.09.06.44.34; Mon, 09 Sep 2019 06:44:58 -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=wtdqX5u3; 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 S1731032AbfIHWS1 (ORCPT + 99 others); Sun, 8 Sep 2019 18:18:27 -0400 Received: from merlin.infradead.org ([205.233.59.134]:39156 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbfIHWS1 (ORCPT ); Sun, 8 Sep 2019 18:18:27 -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=P/awgzoK2k4GVGdBJaMhAEeA4IXyM1r5QKgABXCX0SM=; b=wtdqX5u3qOX9tdMucC4okD7MN qkLx1Cbmaa7AI8SZyp8M9+fPE6A2uXaxSFGu/i1YT2u6qvcARZmnAAT8WIPe7JUDCFsAZskuUHGbZ tLh2mtGVXB6eF+WpZlYd79fVZ8fb2AUT2spUFvU24SfnHI7h/seNYxLZ3+cGnXQoqjkuwjNWCKIlV dh8Ou+g4j8EcN2OnYcQ6DzWA5mjMGWeUbWA66yOKRKsBwkyivzFKow7y8BOno3jd9d43Ckm7bnX3G g4oTNo5AIMLshxD8fgMBXOtqlU0jMZ/L629x92KXRbgg9Wm16VRqaF7KqIsH9IioB6u1K8XPzl9Zl IQ0n8JLTA==; Received: from [148.69.85.38] (helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i75VZ-0007hE-NM; Sun, 08 Sep 2019 22:18:10 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 48AA3980C91; Mon, 9 Sep 2019 00:18:09 +0200 (CEST) Date: Mon, 9 Sep 2019 00:18:09 +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: <20190908221809.GA3637@worktop.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. So I've been a huge flaming idiot.. so while I'm not particularly sympathetic to NMIs that block, there are a number of really trivial deadlocks possible -- and it is a minor miracle I've not actually hit them (I suppose because printk() isn't really all that common). The whole cpu-lock thing I had needs to go. But not having it makes lockless console output unreadable and unsable garbage. I've got some ideas on a replacement, but I need to further consider it. :-/