Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1621157ybh; Mon, 20 Jul 2020 03:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx554WIB3/4SG9su37Lpo6jAaVu8WrRIWU92Szsed/LHcR76HzGVHQ/I6jLWVkAzf9UphCC X-Received: by 2002:a17:906:5657:: with SMTP id v23mr20644514ejr.196.1595239542570; Mon, 20 Jul 2020 03:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595239542; cv=none; d=google.com; s=arc-20160816; b=iOX1jtuxn0xHa58N9E4fnSIHURZQMrZevthnVFBt4gsrYmNA2GABP43zWTorC7lTJP XQCwc1xZ9bGcPBiGqXXoPAcwuWZgEz8cTSTxknOjHhoFxPtM1gUKu1YEbhEPuShfvNRS pX+OkXC4uWqeyXlGYKBdDl3GoALND0HpnQ4Su098C8t1Wbr2E3qKPmz5OTpabkCmX1gE +8LBi4ofUQ0W6TP2JYDye/Ef0ksWtfytVuMixFFHWot9ANGMb6FcFpWlKCt7qqRisVbt xkefnqLurR9ZKtsZUDirHPTUPSA0cL3g9ZOSnF833J9v7fg4Mm5VMBO7i0bKwNE9EWMg ChNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kNLa6DbnfflJZxio7nSoVpRAmped/CM3Jii16qxVH8o=; b=PU+LQdQMVrBca8ikXUxoKUP5KHmAeEar9wRKaV00hGeHVMnTdifCrGPHUgfLNcSwZR nQbGwH3N/gTg6PtwjP3TH+1VHRPDkK6Mjmewxjh3GuKlAcXbvWiAtFu1ozU2udouRIQa 9ZaTkx/F5Zszs1M2tTQrZIrgKtwZDM2JfUUnTLTXJAyS9T7w51RXMPgc6Vv2XqandDr8 /LLhUxw6KglF9/0AV+EgLfGc92lR6+RcDaEmhBOFS0e1/syRbBVq9IlAYfiqM1+GTVNl 7JUSpLv0HhqS8g8nrgYEbX0f+XzOIOQPRHhEJ1I1EPcauojwS56QBPjecsnpTA7iT8Kb IdLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=K2aqumUd; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo14si10242800edb.112.2020.07.20.03.05.18; Mon, 20 Jul 2020 03:05:42 -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=@google.com header.s=20161025 header.b=K2aqumUd; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728296AbgGTKCF (ORCPT + 99 others); Mon, 20 Jul 2020 06:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728068AbgGTKCF (ORCPT ); Mon, 20 Jul 2020 06:02:05 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9A0EC061794 for ; Mon, 20 Jul 2020 03:02:04 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id u64so1406072qka.12 for ; Mon, 20 Jul 2020 03:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kNLa6DbnfflJZxio7nSoVpRAmped/CM3Jii16qxVH8o=; b=K2aqumUdkdkfWL/WYFdjPmHUIvgHuNnWbTcfybXEQ4Zy6ZPVO1psAQmo7+ngmfIt4l Sd/u9JIsXTWPhh3+BVQVSLWWU7tOHhjy1NAVlqxdNVvqXm6+DfpxGxS6uAQ8LZxSbn8e NwwcQSG6rEKDdFqiRsx/BG0S209IJFGWa6Ssa0aFH6pO8NsIDczigZZj69zoGVRrLrQP m8JiFvks0s4/GZYPKbInqB6lbq00tf5WTmDLDFbB0APim8tOjgmJja7j2B1/zNHuPypi H8Cbou2UgEMew6AYrkfPpytek4j+Jr0HW9E17sOXSdPjMg/HLD3sphM+nJ5HnNx2kBXv 7Rtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kNLa6DbnfflJZxio7nSoVpRAmped/CM3Jii16qxVH8o=; b=m+BYWyi+i+h/VB3bxfW9i5BpYRgE55/e3APYwqeno7zMHgNOhvDMpz9esRIpSBXRCz sqHJRKSlD/Ge4v47iok4Xja25kkH3YOMSMkn/hivvo5kgB4pDFM1aCE+iNu8AKK1Jjfi 2PuTvAJDZmy7Xqrf1VuObtsQ+EnDME17/7WleKeoKlaUhx/LeI5nBdpfgPgwVcmTedYd 6nTufd4eciqYoGYffsjYMqJuZSTpI6LUmBgeZRtUm9K7ayx1TcMrbW92yqY70DhhpJlb eznw+KVwMazO9KQRgvU4ucZ5ySXkM2M2popHcMJawKY3Zd6BHeUNh0QkILTIykjif/5Q C5xg== X-Gm-Message-State: AOAM5304g3dsnsl45Pily5Y+E/OKSFwuhdvw3Zjp8CdUbWRX0ONxLq+4 xGWhskQaVkPvgrtSTSKku6Q1N0nIA0SZwTTyrB030g== X-Received: by 2002:a37:4e58:: with SMTP id c85mr21469654qkb.8.1595239323431; Mon, 20 Jul 2020 03:02:03 -0700 (PDT) MIME-Version: 1.0 References: <20200709132344.760-1-john.ogness@linutronix.de> <20200709132344.760-5-john.ogness@linutronix.de> <20200718121053.GA691245@elver.google.com> <20200719034312.GA566736@jagdpanzerIV.localdomain> <20200720064303.GA2144711@elver.google.com> <20200720084102.GC463@jagdpanzerIV.localdomain> In-Reply-To: From: Dmitry Vyukov Date: Mon, 20 Jul 2020 12:01:51 +0200 Message-ID: Subject: Re: [PATCH v5 4/4] printk: use the lockless ringbuffer To: Marco Elver Cc: Sergey Senozhatsky , John Ogness , Petr Mladek , Peter Zijlstra , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Andrea Parri , Thomas Gleixner , Paul McKenney , kexec@lists.infradead.org, LKML , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 11:41 AM Marco Elver wrote: > > On Mon, 20 Jul 2020 at 10:41, Sergey Senozhatsky > wrote: > > > > On (20/07/20 08:43), Marco Elver wrote: > > > On Sun, Jul 19, 2020 at 12:43PM +0900, Sergey Senozhatsky wrote: > > > > > > As I said, a number of debugging tools use them to format reports to be > > > more readable (visually separate title and report body, and separate > > > parts of the report). Also, such reports are often parsed by CI systems, > > > and by changing the reports, these CI systems may break. But those are > > > just the usecases I'm acutely aware of > > > > Can you give example of such CI systems? // that's a real question // > > None of ours should break; I agree the CI system is brittle if it > relies on newlines. Parsed and displayed reports are changing, however > -- what irks me is now all the reports sent to the LKML look ugly. > > Some random KASAN reports (just compare formatting): > next (ugly): https://lore.kernel.org/lkml/000000000000c87b7305aadb6dba@google.com/ > mainline (normal): > https://lore.kernel.org/lkml/000000000000f4ef6a05aa92ec6c@google.com/ > > The same problem exists with lockdep reports, KCSAN reports, ... If > newline-printks to insert blank lines are now banned, what are we to > do? Send dozens of patches to switch everyone to printk(" \n")? Or > some better suggestion? I cannot yet see how that is an improvement. > (And if the behaviour is not reverted, please document the new > behaviour.) > > That also doesn't yet address the ~400 other newline-printk users, and > somebody needs to do the due diligence to understand if it's just a > flush, or an intentional blank line. Empty lines improve readability of long crash reports significantly. New lines in sanitizer reports originated in Go race reports 7 years ago and then spread to user-space ASAN/MSAN/TSAN b/c that was an improvement and then were specifically added to kernel sanitizers. This is even more important now that we have up to 5 stacks in KASAN reports. Please keep them. Also having lots of printk("\n") sprinkled in kernel code and turning them into no-op separately does not look like the right solution. These printk("\n") are confusing and add clutter. A better solution would be to remove these printk("\n") from the code. But this also naturally allows selective removal. Say, keeping for sanitizers and some other cases, but removing some that are not useful.