Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp316255pxk; Thu, 24 Sep 2020 06:28:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBbu6C2M0g2L68XTf/V9+/LzjecOwDPiIGBz2BUHEyP2Df2IGBJb7RNExLwEV8KyIAU5VA X-Received: by 2002:a17:906:1f43:: with SMTP id d3mr1029560ejk.395.1600954138991; Thu, 24 Sep 2020 06:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600954138; cv=none; d=google.com; s=arc-20160816; b=xpH7X02QCn1S4yE11Ic8Z/Qmsd+P0URUt86jDlzBQkdnJznrFdwOlsUpzmsOYxhGdf 2z1RngbTIY/vpeDnh26YFhdABuhl73W/rTOqTP05ekvqjCXr7jblVeq+Vb0kwTpwYo9T RklJdYqBPBvCqeTG9boNS/I8Ofhgea6ziUJwChN3sL/OMdfGKNipx2nB2HcKE5YFdl/K dhbMCxIQL7OG0x4J+gdHKO8R8WxkmEUmWFpgJLdDhaJ5C5/r4qeDoB4Q1fQ0O9l0XU/m 8FeD7ZHIylP2CH0l7HFrUv84MDaydSzF6jUadDEFWIfeQm7rAVlj6wAYZdSCbhsGvEyG gGNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/o8HUIGyiR7bXTTAsdidVaiFgkeoZ4tJxmxbiSYuUYI=; b=dz4kdm8Xr43PP6WEBm2NQJ+lnGNsUVTWQQkmvEEPDLPGDqy0T4CHKwb8hUh193sKod osCTOFPu00knPxC6e1qWKDnvXfOE1kZvagV5Xl/ioSQ9bnxGwzWOIdoDfmx3KDjSJLR0 x6R/NVXANvldMnRLtEMzFXDliyRfzZ9PBNGYYIUDqPYxhABPwvt3JF6kGxslJrnVpop/ cZyIiu8n3Ks4lLY03NOfBknBouOK1W0bGQ4Qom/V6pFmIBUtn1CBhxm+Ji3UOKs3xaGn PUuD27yBzWMsXKDZ3S0tLVS0kAUJ5nUR+VVKRit4p7uTDSR4JvkJrzFWNDG0Mp2RXREd SJaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=sAKDQ8F0; 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=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si2443576ejh.440.2020.09.24.06.28.36; Thu, 24 Sep 2020 06:28:58 -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=@suse.com header.s=susede1 header.b=sAKDQ8F0; 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=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727953AbgIXN0g (ORCPT + 99 others); Thu, 24 Sep 2020 09:26:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:36268 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727846AbgIXN0e (ORCPT ); Thu, 24 Sep 2020 09:26:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1600953992; 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=/o8HUIGyiR7bXTTAsdidVaiFgkeoZ4tJxmxbiSYuUYI=; b=sAKDQ8F0bS5bpqu27PZIl/5KpAF0uyLBWULia75Tunf624OzkGPrMAleSkkvRVM5HpoZzT PVqtx7uuAvjIkb4h214/16kEXJ6h79nmcXWZV3rLq0f7DAxR0jWI6y5SB5+ADPLxoGjAsU dVyTMtOSnQQWVPQ+UCMyWJq7W0QB3n0= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 64165AC83; Thu, 24 Sep 2020 13:26:32 +0000 (UTC) Date: Thu, 24 Sep 2020 15:26:30 +0200 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Thomas Gleixner , Prarit Bhargava , Mark Salyzyn , Chunyan Zhang , Orson Zhai , Changki Kim , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [RFC 2/2] printk: Add more information about the printk caller Message-ID: <20200924132630.GE29288@alley> References: <20200923135617.27149-1-pmladek@suse.com> <20200923135617.27149-3-pmladek@suse.com> <20200924021756.GD577@jagdpanzerIV.localdomain> <87k0wj7fcs.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k0wj7fcs.fsf@jogness.linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2020-09-24 10:29:31, John Ogness wrote: > On 2020-09-24, Sergey Senozhatsky wrote: > > A question. Suppose we have a task which does > > > > CPU0 > > > > pr_err(...); > > > > preempt_disable(); > > pr_err(...); > > preempt_enable(); > > > > pr_err(...); > > > > rcu_read_lock(); > > pr_info(...); > > rcu_read_unlock(); > > > > Should we distinguish those as 3 different contexts? > > > > - normal printk > > - printk under disabled preemption (affects scheduling) > > - printk under RCU read side lock (affects RCU grace periods) > > The internal purpose of the printk_info's @caller_id is to support > _some_ sanity with LOG_CONT. True LOG_CONT sanity will not be available > until we provide a context API like we previously talked about [0]. But > for now it is good enough (even if it is not good). > > We can also store various flags and counters to describe the current > context. But these would only exist to provide the user with information > rather than because printk itself needs it. I only mention this so that > we don't get things mixed up. We can add as much information as want, > but LOG_CONT will only be interested in a subset of that. Yeah, we need to keep this in mind, so that some "tiny" changes in the context would not prevent concatenating related pieces of the message. Best Regards, Petr