Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2394348rdg; Mon, 16 Oct 2023 03:10:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYt6stYyqrQIq6of1H/H5D2HgHIFt8YWqTosaTCjLJbMvmgaNf1DkOzoMMSO9OfoZuamIA X-Received: by 2002:a17:90b:4d90:b0:27c:fa8f:4e91 with SMTP id oj16-20020a17090b4d9000b0027cfa8f4e91mr10635355pjb.23.1697451007531; Mon, 16 Oct 2023 03:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697451007; cv=none; d=google.com; s=arc-20160816; b=IMP0iu6uAncaPb4apC0ETiwshs4g/PAHN9cMEPSPtoekY0heI3pyZa4sknNjofZX4F DLfXL7ec3tGGXSPD45cSqo+ZhZb9Njyj43FNJhwbNiKI7IGcGTutYPH0SKfFR3LQ0i4c rDgGhsh3dkvczsYPE86vmYen/fnURLvGVqtu0WXWwNt59XEm8AtTQU91yrJDVwdT/r4s WSDpkwT618SyUO2uorlC3GIMBVau04ORpVMb8Uxq5DxE0jzBAS+dzl+D4MLZgSb8gkh1 JfVQPg2OFmnv3fBfZrbRAFLkXAbERd4uakYg4DzH89Lbhrgulq2fmclB0BgdLFuhceTI QknQ== 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=Lm/sCgLXyQJvjntNocjGInAVDmxpu8y10P7sSSOLEcw=; fh=junKMAb44lOSwPYrwwfJNd8wO7QrH6Z0Mqg1Tiu55wA=; b=nDOMR+JYvhTnFwE31PekaeNlKrp1zpvxUWcRHNjO3nHbCS/S2SdgIa0BdhM4mqg07M oZ9oyWttj80Q50Xx0BC4o6uI6swl8mq00Sv13drsl/NR0yiosoAwsQ5sO4HwjEa+504Z ELQOcJ6DCXjJZ73vwmOWkm2CE/BL6Kr4AYTNoxdvCty4zM6Qjep4fiOgaG40Zz/ghZr4 J+JGKR+F0MwHVntFEBvIVjc/dgbx7dF40/ZaqS9DpOBc4TrohpEMuj2J4SRNrQBS+VIG ZojOcfacXB8O5dX3fAsrhgY75j8HJRSYssBnA5WTmLBtEIfBz+AukDP5wvKwDZPWwdFG TJ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d0QLvGGB; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ot9-20020a17090b3b4900b0027ced8e1837si6037087pjb.180.2023.10.16.03.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 03:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d0QLvGGB; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 50F8A8096A58; Mon, 16 Oct 2023 03:10:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232133AbjJPKJz (ORCPT + 99 others); Mon, 16 Oct 2023 06:09:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231177AbjJPKJx (ORCPT ); Mon, 16 Oct 2023 06:09:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1692AC for ; Mon, 16 Oct 2023 03:09:51 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697450990; 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=Lm/sCgLXyQJvjntNocjGInAVDmxpu8y10P7sSSOLEcw=; b=d0QLvGGBXR++0sfI7hBvbcjV/d5k1+J2F3u4glhEarSgkt9vMpcM0girfCj/uscrReqWUQ ieulS50IoYNvAOxpmp6Buns768cVVAfFn+Eytmfs5DuOTghok0KPkC0mfvn8llhVsd/XWj kQeSfZZkIV398R4FYmmnm2xz1G7e5RJC9JwFEBOQkbF/cgDSPiYsRegVkibN1UNlZww0J6 qts9DZAaIvarXGutSrBW/NZBBcl14FaWuE8dslPDbZ1Q1i1LI1kvrcP/P0Hgv/KcVqEzB7 USAYvXdq/nIs8PfzHRWWEbzOb07nrtrRO/Qd7dqIQgoUJlGLgtAL9lNuQ03KXg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697450990; 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=Lm/sCgLXyQJvjntNocjGInAVDmxpu8y10P7sSSOLEcw=; b=GqfycxaU1UC4UL17ePNW65pxcyj+LcCCc2oVXIXsfgRoFs1E67VckHwCp+X+akV3Kr9ovc XQzi0bUxm8wP+EDA== To: Dave Young Cc: Petr Mladek , Linus Torvalds , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , kexec@lists.infradead.org, bhe@redhat.com, prudo@redhat.com, ebiederm@xmission.com, vgoyal@redhat.com Subject: Re: panic context: was: Re: [PATCH printk v2 04/11] printk: nbcon: Provide functions to mark atomic write sections In-Reply-To: References: <87h6n5teos.fsf@jogness.linutronix.de> <87il7hv2v2.fsf@jogness.linutronix.de> Date: Mon, 16 Oct 2023 12:15:42 +0206 Message-ID: <87il76ho9l.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INVALID_DATE_TZ_ABSURD, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 16 Oct 2023 03:10:05 -0700 (PDT) Hi Dave, On 2023-10-16, Dave Young wrote: >> > Does anyone really want explicit flushes in panic()? >> >> So far you are the only one speaking against it. I expect as time >> goes on it will get even more complex as it becomes tunable (also >> something we talked about during the demo). > > Flush consoles in panic kexec case sounds not good, but I have no deep > understanding about the atomic printk series, added kexec list and > reviewers in cc. Currently every printk() message tries to flush immediately. This series introduced a new method of first allowing a set of printk() messages to be stored to the ringbuffer and then flushing the full set. That is what this discussion was about. The issue with allowing a set of printk() messages to be stored is that you need to explicitly mark in code where the actual flushing should occur. Petr's argument is that we do not want to insert "flush points" into the panic() function and instead we should do as we do now: flush each printk() message immediately. In the end (for my upcoming v3 series) I agreed with Petr. We will continue to keep things as they are now: flush each printk() message immediately. Currently consoles try to flush unsafely before kexec. With the atomic printk series our goal is to only perform _safe_ flushing until all other panic operations are complete. Only at the very end of panic() would unsafe flushing be attempted. John