Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2062210pxj; Sat, 19 Jun 2021 01:44:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznwdobn8jmzAiL4OgTTtY1Vq9P++NtX4li4KrlCf0O3QYYE9MD8rDXUSRWaefWgaWTDRWo X-Received: by 2002:a02:cc3b:: with SMTP id o27mr7323156jap.84.1624092291787; Sat, 19 Jun 2021 01:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624092291; cv=none; d=google.com; s=arc-20160816; b=UOQuXL+PoqjUvXKGk8/Or3877oHZs3dFkZExJR4K+aV5fI3k10Fgp+h/2h3BeaUHb4 Xm3Fg4GgLuIGafN1zEiTLncM3SHZXDYMvLpfl/vLwqsxEPchHPEl2QMhpn3yoN7CRLxc 2cYHeOZrIGI56HOkhbNYoQyW3CoM8pkrX5CzOuOCrbrK2fUKQ66mbn4JjNEAnjXjdMjG sTk/SC6yLPHpWfC2Jj4rzdStZ8nur4NLLmf/tZUGlVBxLptndI6gbjnNULtAk5t5F/L5 UagINa4ulp90v88Wj5NNmfzrCI0VVRQT+gd4e5evHzkxf5rgFAAlu8lvBbF5XOPZTIxH yBpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=KxAbQdX4x9ITcgn11l/fWdjzsw3PL9N3JK1TmT4+wAs=; b=oHA4S7semcX8bBFMDeBF3iAiLiaGLKhkPPMG5Lz1KkZiAee2JOVFtgKwa+M2wYXveU Abp7c/oQe4wXrRUYl3Z0vPDWSLmo/8XN4Lyd+KwqdFwPOxuuMY49c6t2lua0j/q8ZwZf t6M3lTed5YoOLfM6i2NvkfFpRO51sZJQOAZXxM1WM31b93JZX32/TIr9RpT4zcbAk4z2 CAAilMV9yna/f3ygtVlRQwiitoOUv3V7ZM+DUl7jPI0fr6PEjaR1154uiazccm1WGKJ+ AwnhYueqTQoM2gyrLuGflrPiPd7u14kHCYTTX1dFbH0l8fQTxUKbqpzhyiL+233vbidt ijyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Zm86m9Af; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si5569006ilu.5.2021.06.19.01.44.36; Sat, 19 Jun 2021 01:44:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Zm86m9Af; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233879AbhFSAYZ (ORCPT + 99 others); Fri, 18 Jun 2021 20:24:25 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:59978 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231723AbhFSAYZ (ORCPT ); Fri, 18 Jun 2021 20:24:25 -0400 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1624062134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KxAbQdX4x9ITcgn11l/fWdjzsw3PL9N3JK1TmT4+wAs=; b=Zm86m9AfxpgsoNXtCf9g+AWVSm356U5pNy1VPpBRTqAE//YAUx7aXhYrU3ofKLsmFXVBe3 ZYb8NTodqKFIlrjyCXOufOtdnUBktkyFRAK/2Bb2s5/gZ0qklfowDkrLlJQKQemxLDpoL8 7vwkHoa4iSalVjm1qFRx9rLQqr67pbTf7WrIERXKeTCmU6ZMyex+/Qi1ukoW352iQPvDxj MaPC8S3i26XziC0E9+EmRm3F8l+ocYV2s8/wCTHEgDKgo929O1OClvPqXNoB9PaJFYyeco Ts44CYdt7wA9dePQC8+nXqOKUOCMDGFELrJTejHk5n4yhvgDWuxEPMIiPOjkzQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1624062134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KxAbQdX4x9ITcgn11l/fWdjzsw3PL9N3JK1TmT4+wAs=; b=EN0eTwAB+ucNb1U3wf/PKxjOjcKYMxbYY29jgilJPMc1G1t308fXkH9pCCtdKwtYSyfjH9 ET96zqcKLOivMlBA== To: Steven Rostedt , Petr Mladek Cc: Sergey Senozhatsky , Thomas Gleixner , linux-kernel@vger.kernel.org, Stephen Rothwell , Andrew Morton , Peter Zijlstra , Daniel Bristot de Oliveira , Stephen Boyd , Alexander Potapenko Subject: Re: [PATCH next v4 1/2] lib/dump_stack: move cpu lock to printk.c In-Reply-To: <20210618122541.49fbd114@oasis.local.home> References: <20210617095051.4808-1-john.ogness@linutronix.de> <20210617095051.4808-2-john.ogness@linutronix.de> <20210617093243.795b4853@gandalf.local.home> <20210618122541.49fbd114@oasis.local.home> Date: Sat, 19 Jun 2021 02:28:13 +0206 Message-ID: <87czsiog96.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-18, Steven Rostedt wrote: > On Fri, 18 Jun 2021 16:47:39 +0200 Petr Mladek wrote: >> My understanding is that early_printk() is used only for very early >> boot message in plain kernel. And that there is not much concurrency >> at that time. > > It will continue if you use ",keep" option. And that is something I > have done without Peter's patches, but then they become illegible when > there's a bug if more than one CPU triggers. Note that using "keep" to force some boot consoles to regular consoles does not mean that early_printk() is used. Your suggestion of adding the cpu lock to early_printk() will not help for the "keep" scenario. >> That said. I always wanted to upstream Peter's patchset. But I never >> found time to clean it up. The main problem with Peter's patchset (aside from using unsafe early_printk code in a preemptive environment) is that it does not handle CONT messages. While I'm sure this is fine for Peter, it is quite horrible for things like lockdep output. It would not be too much work to implement an early_printk printing loop as a reader of the ringbuffer. But that is basically what the upcoming atomic console and sync mode will be doing. Once that code is available, it would be trivial to allow early_printk usage if an atomic console is not available. My recommendation right now is wait a bit longer on the early_printk hack. We are not far the atomic console and sync mode series (which come immediately after the safe buffer removal series that we are currently pushing). John Ogness