Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp843424pxk; Wed, 23 Sep 2020 18:43:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYSAGh+DZRi7GANkr29fAlvh3xtPbUjItF9yCl4LSr/T69QvAxVveOSVrvdAK9gQvkM0n/ X-Received: by 2002:a17:906:3755:: with SMTP id e21mr2304586ejc.39.1600911836260; Wed, 23 Sep 2020 18:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600911836; cv=none; d=google.com; s=arc-20160816; b=fUgOcQhk9V0nhzAonoh0JdEdA/XKj6BlOnDYwIEEtio0cDmrjCnNneJp5Wo/NwUfap W2rkzrCabH6Hr4jXwV0IyBd5BDIBALgNwD+Ar6tACBRsHKGI6GDqbAGexNVqev7Dqt72 HBw4mynw5/XjQrRWqY2OAtNFfKKvRzK7YaYxFJHGl1dZR9YiXLOstcMCl0R/bP9JVULe 4bszIE9zRAIB2pxBxiGxllY6vYJdzuhMFwlv6PWL3RIphrnrvAH7tezA1rtCl0AhB+Yb ZiSNrTmWw6zyppccOJM1SXGAazThVpNFljzi4XD/pnS+SxvvhOM1HpFvWzipyk9TCQbB 6Hng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Jqke61+2arfJt+5tiS9HI9FYjbLGcSUxG2Gu6pVfuFU=; b=kc3dM2fb3dgeVG7olOL8HR6yd3QOxG9VGjSfk5gp0FPNOOzvW72RcIaLhXM5W9qMSV gCXZmb4ie+fADF+bnbcbOEBvv36KQVR2nHPwGfmN5yka7lfHe2bA9FblbPB2ph4AnWzX kYJ+2H4T4F+nzVNoI4dXxMaz5oVydEMPY04aB2Zgb2SeDPwnCcf3GFUK7FuNxNO4XvA/ QSXHlhVSQXh0+aJ7pSVe2HACl5vup73OuHvMdocd21mpFyuLx+cIZ9Wa8zvXQIIorGPE eBotC/QWG59z6jZSffkOYSzs/GANhcW1ru9Qaz33+4QeywKvPUYjYuYm7iNEx6Zzs2P2 5aMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=doR0EW+N; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si1098863edq.473.2020.09.23.18.43.33; Wed, 23 Sep 2020 18:43:56 -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=@gmail.com header.s=20161025 header.b=doR0EW+N; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726298AbgIXBj7 (ORCPT + 99 others); Wed, 23 Sep 2020 21:39:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725208AbgIXBj6 (ORCPT ); Wed, 23 Sep 2020 21:39:58 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63297C0613CE for ; Wed, 23 Sep 2020 18:40:13 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id z19so846347pfn.8 for ; Wed, 23 Sep 2020 18:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Jqke61+2arfJt+5tiS9HI9FYjbLGcSUxG2Gu6pVfuFU=; b=doR0EW+NSvfoqRl06aQjpoWQvY+dRXwyHb0deg3yYZfBZH1KaMnypppckt6bBQLhEt aIpUb559wN/Koco+g/ucYnf9rv8WY1znm4jvFIBN13mmbbFw9A4fRmM9m8LzXNEH7wIT iiB/gnoeAfKKOE0Ysj/jvhXFqdUdgxuhV+LAng8k1jruzWj+JeFWS+Yi9+qXAl1Rr+wa 3O4j/Qp28g8xzaQXPqvpSyH8XFFadNyWDjAMXex/HMqMFU1mYZA9OGxhEcRQ1EI7hIwm ApE1KtSRaVdeMgcTpM8R7NHzZ0GQDcgNUgItQFChIydcO2Y5Slj4T+hc/PG6gMkAaDMQ z8Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Jqke61+2arfJt+5tiS9HI9FYjbLGcSUxG2Gu6pVfuFU=; b=NnMLrJNnEJUEvTWsCx5bTOwrVFouVMuNRcLXpm2JEUu7S0zsLOcc5FCaaGqkr9o5tI NGPU2PVp1LhtVcvSiWVIER7i/nICG9bXBrNqNnVhWuXlh8Q/NGenYYt1/qkzbxHwSzcM tC9XZwFD2inMBkC9oNbpKnMpZ2G0gBq8v1owJhH9zUM+EbP6iFVfkNqp6WP6jCai1+x9 bi/XEd4hVcWXXZQPq7AYw4JJG5llkXpJ6De04cFNUEiut6b7wlIFrih4vL+axM18KDQV nMX5Q+36dnpn9YCf/lrr38i3jGnBmXRxCex9nEV1oGUCncFK70LMUh7Y35GAfEFvQf35 JznQ== X-Gm-Message-State: AOAM530b69vK82QVB7wVkBacQ4NnKABp2GERxmKYOJr/d+DT5uf8CfTl uWKP2nBQHpiww/sz1A5REfu9OCMBwrM= X-Received: by 2002:a62:2581:0:b029:13f:ba38:b113 with SMTP id l123-20020a6225810000b029013fba38b113mr2331202pfl.15.1600911612954; Wed, 23 Sep 2020 18:40:12 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id l78sm856637pfd.26.2020.09.23.18.40.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 18:40:11 -0700 (PDT) Date: Thu, 24 Sep 2020 10:40:10 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , John Ogness , 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: <20200924014010.GB577@jagdpanzerIV.localdomain> References: <20200923135617.27149-1-pmladek@suse.com> <20200923135617.27149-3-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200923135617.27149-3-pmladek@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/09/23 15:56), Petr Mladek wrote: > The information about the printk caller has been added by the commit > 15ff2069cb7f967da ("printk: Add caller information to printk() output."). > The main motivation was to reconstruct original messages when they > longer output from different CPUs got mixed. > > But there are more usecases. The number of CPUs and tasks running on > a single system is growing. It brings bigger challenges when debugging > problems. The context in which kernel reports its state is sometimes > pretty useful. > > In particular, people suggest to remember the task id, cpu id, more details > about the interrupt context, and even the task name [0][1]. > > Prepare for extending the caller information by replacing caller_id > with struct printk_caller. And always store task id, cpu id, and > exact interrupt context. Wild idea: Currently, we have two sides to the problem, I think. There are tasks that store messages, but then there are tasks that print those messages on the consoles. And those tasks and contexts are not always the same. What I found helpful in the past was not only the caller_id, but the emitter_id (especially preemption count and irqs state of the context that prints messages on the slow consoles). -ss