Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2951575rdb; Tue, 6 Feb 2024 02:46:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhcaL3Kz0TsCtxZxlTLqm1CkvCBSOCfNICPFWMtLwuVqIFBopfJlL76JX051ksxDgPL2oS X-Received: by 2002:a05:622a:244:b0:42c:3041:3bb7 with SMTP id c4-20020a05622a024400b0042c30413bb7mr2220066qtx.22.1707216394927; Tue, 06 Feb 2024 02:46:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707216394; cv=pass; d=google.com; s=arc-20160816; b=QmYVLgD71dlhiLy3SWYqs+vrY70OC3m7PiGFppt8bEnQSjWfNehOtEPt/g95BUHrEf D8n0Cv6K2bX+qTLWya7z1O/a9evRZIffkjGSZI4XiBmQhVexnVlOyJFxzxY3DUAaptFy EUoiW8Q+HX0ISR2rMDRWIUOSqvIzAHdLwwpn2/yuEf4van4rftL+7vmjyYnaal5AHLi9 WlrDlPgexs4EQTUrRDKnyl/++HriGoEF0WHSXOw2KxYseRnPX9dQahIA2O16++RmuTFP ADyI4nO7jLulJvdd4hqidpF8uqx/d9mI3GIMAErehoUwQvqS80CyL0DJes7s66myZOTg 9GxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=Qb+UQ65FDDvRjIOjrulbZQv61mUC3gZRLJFgkOLRTOE=; fh=4hs/iXMKOQ8cnbB3SXPkgdAii38j/2D1py57iiOpAMM=; b=sFikDQdzmBWRfxOTJDFeh8bBziFy2qedUH16613HF80BlTxh14/X+lA650lu92NnLd 9h0ZdyrNGAJ8p7zxv5D/QXxqJJz/4ySmHuqxFK95B3gPchYpc3KX0kvZ2mXes0BgXf84 u+QhmfjTPhHDqxz+EkHRZJkEfaHA3Fj/JGkF56rX7iJilATw/4ah12rNkC3dgff9aIS/ P+xUpBL/USM2yiZNUM2FQR/JgXbxTM8hyBYNZ9T5HA7Ug0jZLjzuYolYq1UKyJ2dAGXy QH91QHLAaNsv+FGOIRqcFe4nyr82HcVvmENSOPK2OqPLNXv0lsXQ03P1winM/Nja1mf1 csoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sI6JEwa2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-54709-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54709-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=1; AJvYcCUx1+DUs+Kf/y2uC8DW9zTBK8xvgpTU9h/9YRiEWnoZ+N8KOb+6iapytoMLcFe7SIlm8lghn2pZ1clURfxxB+0K2E0S3TSRJW6zowomXw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w6-20020ac87e86000000b0042aacc878b9si1971875qtj.655.2024.02.06.02.46.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 02:46:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54709-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sI6JEwa2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-54709-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54709-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A9DB41C217E2 for ; Tue, 6 Feb 2024 10:46:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C11BD3D54A; Tue, 6 Feb 2024 10:46:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sI6JEwa2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="a8upz2Iz" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B83C1EB2B for ; Tue, 6 Feb 2024 10:46:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707216362; cv=none; b=mmEbF2AgA9A/BTaoA6xUR7HcZDZXm5tuX1RnPIRUJGlatgch4/CJUhLJJQbH6MkwFMcTRE+yjH06eZ0LSpsp6OyI765N4KquHFKLdmk2LBqYJ1Ws5XkWaIWRek77H+QNMtjYOUBVALgpV9SVN35HsvSOkWDdtnI9yRZYDnTBpQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707216362; c=relaxed/simple; bh=Qb+UQ65FDDvRjIOjrulbZQv61mUC3gZRLJFgkOLRTOE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=uLVi8+/sPYTbl5Jmt1TmwhSIJLMhGz3wvwRsoys8IUWxm1O8eT0rPbTa2buXXcipR4dDGw7aclxsKVNqJ0CUUCiESeBzb9FraAblhQMIQP1PyejPB9fehHwzBS/sAlRk/NKCaz2VeFPFzh6MfvkfTUbdXa8QOgWQ4FSvIUZgbJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sI6JEwa2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=a8upz2Iz; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707216358; 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=Qb+UQ65FDDvRjIOjrulbZQv61mUC3gZRLJFgkOLRTOE=; b=sI6JEwa2QxvmSgg59qQHMO/5LokVd21+thiYf5XDhrDkuwnMJ4ryu+peG4n3ZMefneKFun omDq+bd50iKhGs9J/g9xv0rlWnunIFsFEm5AEmI/BF7V3vn1L/spjx5Wvb8J4uekYbHQxO 2HZzboTEJKadtDBEk8D0bfUZ8phHTK1DCxAwhXn0r9/5pM3nlAd6PoJLgKh9JfSq/c0qMj lsoffzXJ8FhtMRcggzAqeoEbi1iSsKEMhNFsdo5/OEG3ebUWipb1s7n2h5YnxUbN7vtAR/ GeJvySM1miErGxh2e4cMdqJoOnR4DtUOhODcxWB1PakaQrtp52qkRQMXI7rRLQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707216358; 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=Qb+UQ65FDDvRjIOjrulbZQv61mUC3gZRLJFgkOLRTOE=; b=a8upz2IzsWKsdKpjzxKCb+ekcyuzwR+Ibn+TpJy+TT1+IH9BxqpZPeESQUKKMsoYVXqS88 ZBNX6JuUUUy8mnAw== To: Petr Mladek , Douglas Anderson Cc: Andrew Morton , Li Zhe , Pingfan Liu , Lecopzer Chen , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] watchdog: Better handling of concurrent lockups In-Reply-To: References: <20231220211640.2023645-1-dianders@chromium.org> Date: Tue, 06 Feb 2024 11:51:50 +0106 Message-ID: <87ttmlan1d.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On 2024-02-06, Petr Mladek wrote: > I have just got an idea how to make printk_cpu_sync_get_irqsave() > less error prone for deadlock on the panic() CPU. The idea is > to ignore the lock or give up locking after a timeout on > the panic CPU. This idea is out of scope for this series. But it is something we should think about. The issue has always been a possible problem in panic(). > AFAIK, the lock is currently used only to serialize related > printk() calls. The only risk is that some messages might be > interleaved when it is ignored. > > I am not sure if this is a good idea though. It might create > another risk when the lock gets used to serialize more > things in the future and a race might create a real problem. With the printk series we are currently working on [0], only the panic CPU can store new printk messages anyway. So there would be nothing to synchronize against (and it could be safely ignored). kgdb uses the same technique to quiesce the CPUs. It does not use the printk_cpu_sync for this, but it is an example of a possible future usage not related to printk. My vote is to make it a NOP for the panic CPU and then keep an eye on any future uses. Should I add this to v4 of [0]? John [0] https://lore.kernel.org/lkml/20231214214201.499426-1-john.ogness@linutronix.de