Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2036716lqp; Tue, 16 Apr 2024 05:53:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNVHruAfLxEwn0h6VnOCwbS48Jlwx57I82Sgsqf+5xtA5SN37poES4sNTgmRTcSdDRzCcdYxc1srSGGfREH5Qfv4uD+dM6kuAE2f3nlQ== X-Google-Smtp-Source: AGHT+IF/2RgLWxwwCnrjb2m4capGqMvUkI9cIUNwfqdPK1b4xONkpj2A+g5hcX6XAOYcBJi4qxEu X-Received: by 2002:ad4:5582:0:b0:699:2674:929e with SMTP id f2-20020ad45582000000b006992674929emr12373976qvx.10.1713272028058; Tue, 16 Apr 2024 05:53:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713272028; cv=pass; d=google.com; s=arc-20160816; b=jQ1WMJdHjX2SvkPExLCDbTFP3XToGbIhcvRsQ5kXn9nRSn9Hm9F2eNJLIp0QlR0igN qJIHJ7JHAYzkK0enoju+1O10x+M/dRPDpWG4RUT45p9BsCDwt6o9dl81HEsZbNAL8x2H wRCvuGpkuYXu0BorfkExi8iSI4ioOvbkXYTqs11lWn4wykZGNDecIhZdsRvuIuGdISfs gS8DS8Q/RwPgUaKx6uAohFnr6S1fXJC70fysQxVzDpshLwg201jLrpNXl7OaHYlcHT+N MWdP76Tejx6qkf1MkMJCL1U5Nx8j6rkVMifg9kv9+6ynDmIhgkjF0YwB/qLmiQmw5N7W s4bw== 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=CMFCl/rnVJq1sqUQE5VnVFZQ0yXU/chs4WFIUDzsXzU=; fh=4L9qmDDOfsanZWXI4dPafRapavXH/LzNBuODY2xa9lM=; b=nT2M6e5gJPKxMrMdRCshx0QHuwxnEE/8h2vlx49VIvQXkfdVFLF6NrwpGDb6hZ8ya9 TIzghLLCyFSYC2gdu+6bhydvR4lQyN52lpwZOPjaJUsXYstwts1rRwjlUnm8IpPaKeSK F06LUr1dGiLgFmeivCI0Rk3/Ss7OlPzv1JZt5ZrWmV6bvUHun3BT0ZoF20YfUMsrgcqc rhnmccbAxHaBGGi0dguyTs8QqjF0w4ddqOIehnG0j1qKsp6ti9zSsNDYtnb6wRQKdDma xqdm/LzgzKwukxenMoND9cS2lkUBhqHToYOXBlqRv8lar9/lRYESKYF/5imYxALVWHdU AQOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zvSaZ708; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=zZDbJCOY; 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-146825-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146825-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h6-20020a0cd806000000b0069b7c307240si4438506qvj.375.2024.04.16.05.53.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 05:53:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146825-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=zvSaZ708; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=zZDbJCOY; 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-146825-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146825-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 8D08A1C20BE5 for ; Tue, 16 Apr 2024 12:53:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55A0C12C550; Tue, 16 Apr 2024 12:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zvSaZ708"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zZDbJCOY" 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 1F31812BF04 for ; Tue, 16 Apr 2024 12:53:07 +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=1713271989; cv=none; b=QMXsiZX6izkqKUKHisE3LHUtqedS8GgcNgGWkNChm7s89fe8TmLl6LGJ0KqyNE8sCCwPVcxXkf+2ABweT/DK69uez7PfiJV9zsg8A3FSYim388s6IH+3LuVY0dh6x1RfdICdZTwDExJKnlkpv9FLmdASXg0YZ3vk/emqAJCzLvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713271989; c=relaxed/simple; bh=CMFCl/rnVJq1sqUQE5VnVFZQ0yXU/chs4WFIUDzsXzU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=cTT4Vylmqf1ziXkLed2oGKZR8eqHQFFXEsuT+wEWCMSfeTRbPj5G1CK9ahWFHzPvz57egwujRazGGW0JidfYpsjg47qVxj9le5kUR5/FSj2cVhYV/lxCk7yDnVcnmo3AS/sbwcwA03ozNK2AfuMmX+DjnbEXaoFZtosgVvUBfnc= 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=zvSaZ708; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zZDbJCOY; 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=1713271986; 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=CMFCl/rnVJq1sqUQE5VnVFZQ0yXU/chs4WFIUDzsXzU=; b=zvSaZ708a/uUuxgccLv0dcyZ39dA2y9RaGJIuhBIQgynggywwHunG9csBrkiyCZa6lH4qo Uc69uKbG7f31/EJGihd2whdVrEjvdqD2/ctumVZynxc/kjxIuCUIJHFFmXbL/mLgpXfPgY eWTEsriwC/prOythazvoe83npAa8esuqf8R0XlRBwSsZ1V+KMh+4k8DYsdyKk559JtKkDN rbvvRb9Lwm5FTlbXsDBEwYNpcHLrWm4reggtVd9nF9gjUSJJ0VSyq6E54VjKlCQjvhplnH SaQeqq1kvbUy2VmjJPGq5ov0wySM/Eq6+p+UsoEKtIHruhsJETquCSDfBVceMg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713271986; 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=CMFCl/rnVJq1sqUQE5VnVFZQ0yXU/chs4WFIUDzsXzU=; b=zZDbJCOYYgyDicfNnyvP7drR2+ppPAui4jiIH1+K4rG7aM25u6EHr5HrggIG2K2/UL72qP WIQFTZsys8MOULDQ== To: Peter Zijlstra Cc: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng Subject: Re: [PATCH printk v4 27/27] lockdep: Mark emergency sections in lockdep splats In-Reply-To: <20240416111749.GM40213@noisy.programming.kicks-ass.net> References: <20240402221129.2613843-1-john.ogness@linutronix.de> <20240402221129.2613843-28-john.ogness@linutronix.de> <20240416111749.GM40213@noisy.programming.kicks-ass.net> Date: Tue, 16 Apr 2024 14:59:04 +0206 Message-ID: <874jc1lb9r.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-04-16, Peter Zijlstra wrote: >> Mark emergency sections wherever multiple lines of >> lock debugging output are generated. In an emergency >> section the CPU will not perform console output for the >> printk() calls. Instead, a flushing of the console >> output is triggered when exiting the emergency section. >> This allows the full message block to be stored as >> quickly as possible in the ringbuffer. > > I am confused, when in emergency I want the thing to dump everything to > the atomic thing asap. At LPC 2022 we discussed this and agreed that it is more appropriate to get the full set of emergency printk messages into the ringbuffer first. This is fast and lockless. Then we can begin the slow process of printing. Perhaps I am making these emergency sections too large. Maybe only certain backtraces should use them. We will need to gain some experience here. > Storing it all up runs the risk of never getting to the 'complete' point > because we're dead. If no other debugging mechanisms are available to read the ringbuffer and no other CPUs are alive to handle the printing: yes, we are dead. But if the machine is dying so quickly, it would probably die before getting the first line out anyway. Note that by "dead" we mean an irresponsive system that does not panic. John