Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp241485pxa; Fri, 14 Aug 2020 02:57:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVulbmtC1JOB8c0r39VhbwCrIC2SR4QFD5Xs8oR2PUTOx5m/c1y3GVi1NoN6Gi5MqyWM1i X-Received: by 2002:a17:907:208e:: with SMTP id pv14mr1737210ejb.438.1597399051745; Fri, 14 Aug 2020 02:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597399051; cv=none; d=google.com; s=arc-20160816; b=DaeWEWJ9Uvm1uOcz2swNcUnu0Nb7DUEMBLa9uA5a5vg9KFBL+ZZXBjOl9OZzc3V+hL wbo2lBX6uietBrjOBXPpo7+q0+b6S59inHrcSXjZpoU3N+2YY8HDF89NKw4+ntuOnZ+2 0mvZAUtKiPhk4+X2hWSeiJbWSkn153HQok+Hgxl+a7D2GmAVNIZE+lylOjvAwPtoFTGt OeyF+nrD+YPcDLUpsUp5gOdQMtQErSf5pCdw6LDKUKvyZEMeaVxfQeVYEKwKCPHVYTJF PGKBJlCINO0sKYdmJ+M2B+Dhc7St3NNF5JMIa0WL0z5nB2jH5+StJKO12Xs8FBtZ/zOR CIzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Gsa7HVp85FObg9+eZ/GyZm1qOu3gUdGMwu/MKkSnmD8=; b=mgnMX2tA6i5tqkTi4zuGS8qooN15V3Q/J0i16cNoX0K0DcHM3PHekX5rEJI6gNkqq+ TW6VSgYTM6uQ8sJSV6ENwtYzZuf1z/8cd3o1NBEAgiAlCiYmef/3mZAlY24AoGyZWHC5 q4RznvMkJ6IQWWSzQRlEbh03YW3Oc5L4MRT8HLSeeGfH4dHTAa30Snnfh5vIxHSKJCd0 do5oOVOCLI99hbsh57cIKj8QupA80gJyemyZP1uYjIxO82FUb+2+U7XuwRAkFo3LCik+ ypeLu+XFjtpbPXI0iilkwC5x1s8Pt6AyQuTYcE8LXgiNneeQJPCdgcEIoSFYsC21gF1S rDIA== ARC-Authentication-Results: i=1; mx.google.com; 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 do21si5907818ejc.92.2020.08.14.02.57.08; Fri, 14 Aug 2020 02:57:31 -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; 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 S1726408AbgHNJMn (ORCPT + 99 others); Fri, 14 Aug 2020 05:12:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:44802 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbgHNJMm (ORCPT ); Fri, 14 Aug 2020 05:12:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3639CADC1; Fri, 14 Aug 2020 09:13:04 +0000 (UTC) Date: Fri, 14 Aug 2020 11:12:41 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Linus Torvalds , Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Peter Zijlstra , Thomas Gleixner , kexec@lists.infradead.org, Linux Kernel Mailing List Subject: Re: POC: Alternative solution: Re: [PATCH 0/4] printk: reimplement LOG_CONT handling Message-ID: <20200814091240.GL6215@alley> References: <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> <87v9hmrg84.fsf@jogness.linutronix.de> <20200814033424.GA582@jagdpanzerIV.localdomain> <87k0y1k5gc.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k0y1k5gc.fsf@jogness.linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2020-08-14 10:22:35, John Ogness wrote: > On 2020-08-14, Sergey Senozhatsky wrote: > > One thing that we need to handle here, I believe, is that the context > > which crashes the kernel should flush its cont buffer, because the > > information there is relevant to the crash: > > > > pr_cont_alloc_info(&c); > > pr_cont(&c, "1"); > > pr_cont(&c, "2"); > > >> > > oops > > panic() > > << > > pr_cont_flush(&c); > > > > We better flush that context's pr_cont buffer during panic(). > > I am not convinced of the general usefulness of partial messages, but as > long as we have an API that includes registration, usage, and > deregistration of some sort of handle, then we leave the window open for > such implementations. Registering some handle is an interesting idea. But it rules out buffers on the stack. And we should avoid dynamic allocation. printk() must be reliable also when there is not enough memory. Please, keep it simple and do not add dependencies on new subsystems. Using external code in printk() is always a call for problems. The called code must be lockless and must not call printk(). Best Regards, Petr