Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6664382rwp; Tue, 18 Jul 2023 04:11:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgrVe2XzjsZeEZuTXrXtAamw0iuLN8xIZkqxzvbhGt3ungYEeqsLbeAmIMfgC5MPkzQluJ X-Received: by 2002:aa7:d94e:0:b0:514:96f9:4f20 with SMTP id l14-20020aa7d94e000000b0051496f94f20mr1820411eds.41.1689678669480; Tue, 18 Jul 2023 04:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689678669; cv=none; d=google.com; s=arc-20160816; b=TKpdkvL1NbZs4UvTFNwEt0zvVMuGg31Q/+n92wc5WSOvRCnAdnsSaRFWqjxbmuPMWb weWXImj4t4byo76sfc2RquVDgbUOPJoAyp8tu3G1S7GDFv16F+w8M8eMw0H3j6VTcAou gWSorefTiAIC6EEFi/LiTjgbZ1PtAJUPhU+QYX1VPvMs3FnUajIbDlcPbEGdqoWgtyvj t+Qo4lBXnDx0p87dqJmiLCbn+s3LGMxxGmcJFq6RV+39MDmUGfw2/Hr/XE2FxeOXNlaA 2b9PuCsF7pcKZLcBRB82SM0vCwprwq6S67UIDWe+h4CNRQ3cevdhyCcx444eg9b7VcQZ x55w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LvQ7gxvIfRJWJtKzj86mRWgvjuCV3Bsma1148iePS5A=; fh=oPFVAToQkY6bsl1Vt24pO33VB3QR8tT4rK/qyEfOsuk=; b=Hzax3jmFIelHxvx0aOrLs1PL1h+c1Cm0c67ga3wVdKdzbElWKVzxNzg6T3Fhc+ziLX mBrTwYYRbcM4svoRrTu/oN8wE8ZHZFgmkiAiaYctEwltqDMUmH+VaXbN8CzVotNOlUcP nVEsX5FKwewWt6+xclbW5SksSTLoH57+3IE9S76b6JPCEpNxGwFtPpx8O3QfJMPBFEP9 IbTy3ocyPWvQpbC+slWxH3RhIz5ozPPnWLeE5WXpJI4+sIBE4bVne58TXwUSjilM9+AQ Zg58hlW8tRm79ML46UE6dk2uVcIM0tealFsFLCw8lRFMVtacQZ2jOCQrHUNGgfPzZQY4 Xvog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bl9kVrlH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020aa7c407000000b0051a5ea200c9si1072541edq.343.2023.07.18.04.10.45; Tue, 18 Jul 2023 04:11:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bl9kVrlH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbjGRKXj (ORCPT + 99 others); Tue, 18 Jul 2023 06:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbjGRKXi (ORCPT ); Tue, 18 Jul 2023 06:23:38 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 559391A8 for ; Tue, 18 Jul 2023 03:23:37 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 01C142188A; Tue, 18 Jul 2023 10:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1689675816; h=from:from:reply-to: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=LvQ7gxvIfRJWJtKzj86mRWgvjuCV3Bsma1148iePS5A=; b=bl9kVrlHfh5tMopu71TPE7z5W7qicTb4SI48bClZWw9FWORvA4f0QuQB8ksCdO/DGP0pgF xIpjtdXhOuZV0O64rtmcAk9g9G7ZK6dzTc8LxQozei0/8LbRh9Us+qwffbXlvZjrj8Jbrf S3TSLg4cuTYYrI4oqgtNBQzP8OxLirU= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C75552C142; Tue, 18 Jul 2023 10:23:35 +0000 (UTC) Date: Tue, 18 Jul 2023 12:23:35 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk v3 3/7] printk: Keep non-panic-CPUs out of console lock Message-ID: References: <20230717194607.145135-1-john.ogness@linutronix.de> <20230717194607.145135-4-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717194607.145135-4-john.ogness@linutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2023-07-17 21:52:03, John Ogness wrote: > When in a panic situation, non-panic CPUs should avoid holding the > console lock so as not to contend with the panic CPU. This is already > implemented with abandon_console_lock_in_panic(), which is checked > after each printed line. However, non-panic CPUs should also avoid > trying to acquire the console lock during a panic. > > Modify console_trylock() to fail and console_lock() to block() when > called from a non-panic CPU during a panic. > > Signed-off-by: John Ogness Reviewed-by: Petr Mladek Best Regards, Petr