Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp717498pxa; Fri, 14 Aug 2020 16:26:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwU+ieta+0ZDNpZ4ta07vXb5ZLpsvkInALCMyOW4X3NrD6ViGPGVEncs85pYJkw1Ukm3ucx X-Received: by 2002:aa7:d8d7:: with SMTP id k23mr4797827eds.54.1597447577497; Fri, 14 Aug 2020 16:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597447577; cv=none; d=google.com; s=arc-20160816; b=fbZYimPUormAqDbEJtfIwegmX7jgbhi6ZSZlDa8YD/PFiEkUSF9LBhj/5AMp+0OBd7 w7pheNd8X1J0g9+t/Y3YUfNhCp5CgS5hyOo4UchY9jNTx5ju4TqyA5hGS0Naqa6ZNPni nSbJejqCnnvCy5hjCgBUShMY+wMLAOny0zdLYpFGL7sF1pv7MHShkhOdt//vfwVFpriz PAxregdHZe3jK8H8ZD5JLDavD8eksLZgZV2t7ZD+LQcNth9QUBNEReTKSHcSC8oe0qpv J+6mqGlSlthbPVhegi1JKadTyvI13h2zdw3426XcQF5wo3DPvxYZQdKZZwtJ/zZQEsXe h3DA== 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=LMHHqpZMExPkpnHmo+3MalBUzwDo2HDU1pz0k0B1TSA=; b=q6Wv2BAGQt3+INGKnlgQ03GYrSEFpDPYNtFLAhtx44ASKuC1AwZjVxC9rewuD7vcyk XpwGK32Cmw1q9ZXChPW4Kv5f1KElfGia28+qgnkZw05WyfunYe9f4qhNvQvrM6t6WNUV psZVXYKylzU9amoH3bXQQVZD8drmLYJFw+YxEVviOzkLCsEfHkO+kyOJkvAIztE1sPju 234XWFIlk/H5l50aQNYEWlEJGC5u5m8Cxn8y3VK/ck4M2aAXHWePIo+S+oHFHwTqG0Ci qTWjaRkRMrcGupDElZdntJCCxeOIx+5rihsLgRDglBq+yLRLJzdUop41uDu4pqHnourI BG2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=LaBf2dos; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si6566782ejd.365.2020.08.14.16.25.54; Fri, 14 Aug 2020 16:26:17 -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=@linux-foundation.org header.s=google header.b=LaBf2dos; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbgHNWqv (ORCPT + 99 others); Fri, 14 Aug 2020 18:46:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbgHNWqu (ORCPT ); Fri, 14 Aug 2020 18:46:50 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F33CAC061385 for ; Fri, 14 Aug 2020 15:46:49 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id v4so11577754ljd.0 for ; Fri, 14 Aug 2020 15:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LMHHqpZMExPkpnHmo+3MalBUzwDo2HDU1pz0k0B1TSA=; b=LaBf2dos0BNfgB3XUtaoz2HGT0OLNq8Lk4PIiDYm1cpXuZyNz+PXpSYJmwrhdlIKbF tQNOSSlt+RU+9+8q2Cxnhuz0BasWnQvQkbEcRhxQS8cG7B+DQ/XzlKpbWIRS9BSNc7Hb kMp1oPDks0J7OofepXaPrrJILRWwqyQ6NNZyQ= 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=LMHHqpZMExPkpnHmo+3MalBUzwDo2HDU1pz0k0B1TSA=; b=PhYKWKfiw3d+mYHOrRN7t/e7KSgGl6kae2vpFalUMJUBxYFy3APf6xPCFs4Hg7Mu+5 KLfuaRaJ6dVxVmAyBNWnxMrby80KCi7VhIlbdPy2V35dn78wo6n3K+E+N+mhjNrI3dKG QWCp1oD4iKVEd0bBQnr2oz0rVAQ83ohaXG4VIHFF+CmQXxHQztZPJ+tnF+WlIYfZ9Sbj LOJhWO+vO95i5HiwHMH4qh5EjHEhHqXD+qLbAg+6DosnFJhSLal0b5ISejucge3fzYYn pqpjpGhKElOmXvWrdPHsKlSqFSlaK/016YB3jV5w5qvBplBlRZeG+8xZcS/rCotGB6V7 S0tA== X-Gm-Message-State: AOAM533S+i8Z9peexxLLjOhy5W0ncgHdXUjNAdj1JdGHdKUk0mKf6N/1 NtYXfQvUBxCxZbDSKbBTB6KeIcZjIW4EvQ== X-Received: by 2002:a05:651c:2cb:: with SMTP id f11mr1922602ljo.431.1597445208069; Fri, 14 Aug 2020 15:46:48 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id s4sm2156322lfc.56.2020.08.14.15.46.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Aug 2020 15:46:46 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id 185so11517757ljj.7 for ; Fri, 14 Aug 2020 15:46:46 -0700 (PDT) X-Received: by 2002:a2e:7615:: with SMTP id r21mr2087781ljc.371.1597445206132; Fri, 14 Aug 2020 15:46:46 -0700 (PDT) MIME-Version: 1.0 References: <20200717234818.8622-1-john.ogness@linutronix.de> <87blkcanps.fsf@jogness.linutronix.de> <20200811160551.GC12903@alley> <20200812163908.GH12903@alley> <87v9hn2y1p.fsf@jogness.linutronix.de> <20200813051853.GA510@jagdpanzerIV.localdomain> <875z9nvvl2.fsf@jogness.linutronix.de> <20200813084136.GK12903@alley> <20200813115435.GB483@jagdpanzerIV.localdomain> In-Reply-To: <20200813115435.GB483@jagdpanzerIV.localdomain> From: Linus Torvalds Date: Fri, 14 Aug 2020 15:46:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling To: Sergey Senozhatsky Cc: Petr Mladek , John Ogness , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Peter Zijlstra , Thomas Gleixner , kexec@lists.infradead.org, Linux Kernel Mailing List 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 Thu, Aug 13, 2020 at 4:54 AM Sergey Senozhatsky wrote: > > I think what Linus said a long time ago was that the initial purpose of > pr_cont was > > pr_info("Initialize feature foo..."); > if (init_feature_foo() == 0) > pr_cont("ok\n"); > else > pr_cont("not ok\n"); > > And if init_feature_foo() crashes the kernel then the first printk() > form panic() will flush the cont buffer. Right. This is why I think any discussion that says "people should buffer their lines themselves and we should get rid if pr_cont()" is fundamentally broken. Don't go down that hole. I won't take it. It's wrong. The fact is, pr_cont() goes back to the original kernel. No, it wasn't pr_cont() back then, and no, there were no actual explicit markers for "this is a continuation" at all, it was all just "the last printk didn't have a newline, so we continue where we left off". We've added pr_cont (and KERN_CONT) since then, and I realize that a lot of people hate the complexity it introduces, but it's a fundamental complexity that you have to live with. If you can't live with pr_cont(), you shouldn't be working on printk(), and find some other area of the kernel that you _can_ live with. It really is that simple. Linus