Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1723766pxj; Wed, 19 May 2021 12:22:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx064gGISb8zyQsSFPyv0IrStaZeImRETnnksZ9k3c6avjfyrEDvzH4xT1W+AA/Yql7Zhpa X-Received: by 2002:a5d:9a97:: with SMTP id c23mr1251526iom.38.1621452124349; Wed, 19 May 2021 12:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452124; cv=none; d=google.com; s=arc-20160816; b=yZB3wMGfDm9ErwHWpwrqjVgIffwKlChcW5x5Gg7HXvklghqgh5fXgeayghOUHKOQ8U r7RAxLJLcTcx8eialqVcFCKbJtnuvurlN6zZ5RL1+ABBQDVS7X7aoZQJlqcg//j/rKZc dS2H0hChWBGyGSbZCNh/N/qtxxHWSVn9LJSCAjr/ylnKrmBO+FPyMDH7piG303KVWHQk WCVAduui+Ryw9D8HgPcqfab4z5G3YIr47Y5pDBPllUA+wDsYSJoDuKY9CUj2SVmppib7 JHCQTIBwlDZHVdJMilzik8FIW0JswW3M4Tu4eBLzwyhKXJ0kwTKLQ+9zyuMYw5Ewadz/ G8tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=u36eElYQ61qgPnHnIW77jfB6ETs4x4TzUWV7BJytFlc=; b=k9QRslr6LYXjj20sEP8bd9H1bcf1stO34pFBOx5zMxFhozLcF5fbcI1qnu071/ep1y XRptyVWDllyIIKAEDQpm45B1wtCTVOtQH35ye+gN61AbMCTy947UzdOitVmOqiZjaP8/ gmuK0BA1vjffs5hEmHqpzGNdvOFFAG0/Eo8kCjSIuyp4apEALjsTcTK77gI1cvzT/BgX ppKhwRTu1krtYpueSLbigqIz0PtVEL+N4Q3iKnGDMQOSdjYruVQ/NeDQ0TmVoq1VUkUa gbWbJNEcBqB/2nOe14VpYEhbQU6btT7Hewj14dYTDJyJkmv86t0xUdBtAdtfLXsIG1Zu Ls2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XDIHd9P4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=OE+jR2lU; 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=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si103619iog.66.2021.05.19.12.21.51; Wed, 19 May 2021 12:22:04 -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=@linutronix.de header.s=2020 header.b=XDIHd9P4; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=OE+jR2lU; 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=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244635AbhESI04 (ORCPT + 99 others); Wed, 19 May 2021 04:26:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244386AbhESI0y (ORCPT ); Wed, 19 May 2021 04:26:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6713DC06175F for ; Wed, 19 May 2021 01:25:35 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621412733; 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=u36eElYQ61qgPnHnIW77jfB6ETs4x4TzUWV7BJytFlc=; b=XDIHd9P4roBxpYK9lu7ZodT3w/8A+9tB28DAc9MpOYXIMzEy78Bb1OhhT0BnQxGnw18Vf/ Z4EzsRlCjbHqOTiauBI5vdSq51EnSLzdLS1MTDZoBxIeGb+e+nlwY3R2Yq2zc/v/vBme20 YUHJtvf5wsMdDYTQpX2+Y1fg2D3SdjVHvNFD36jof+sSHYSL4xyx2EnRzWI+6aSIR2WtI6 SJmwX9uENwHVxZ8aQT6aMglx47LzAAbr7dxEknnFnRMZHI1rbneu3rM4x9lX7Nl/zBJ13W tXqFQkqmHmGPDrAOd8cU/PjSvUisbeKL+fCmb9HHiYHnCkGK1rsBZBuuOJcSVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621412733; 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=u36eElYQ61qgPnHnIW77jfB6ETs4x4TzUWV7BJytFlc=; b=OE+jR2lUPg37khu9z7smpuQmO/zo3bWhnp9+Mz+rWcAo3lizbaVOHKKU2Oj+e2suqP7nkj 76JV0TWqA1DVvGDQ== To: Ruifeng Zhang , pmladek@suse.com, senozhatsky@chromium.org, rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org, ruifeng.zhang1@unisoc.com, nianfu.bai@unisoc.com, orson.zhai@unisoc.com Subject: Re: [PATCH v1 1/1] printk: always output coreid in caller information In-Reply-To: <20210519063355.5147-1-ruifeng.zhang0110@gmail.com> References: <20210519063355.5147-1-ruifeng.zhang0110@gmail.com> Date: Wed, 19 May 2021 10:25:32 +0200 Message-ID: <87v97ft9j7.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Ruifeng, On 2021-05-19, Ruifeng Zhang wrote: > From: Ruifeng Zhang > > Sometimes we want to know which cpu the process is running > on when the log output, rather than the thread id. So add > the processor id output always in the caller information. > > caller_id bitmap: > [63:32] thread_id > [31] flags of in thread context > [30:0] processor id The primary purpose of @caller_id is so that the printk-subsystem can coordinate LOG_CONT messages. Your patch is about logging/printing additional context attributes of the printk-caller. This is something we have discussed before [0]. I think this should be addressed at some point. But we need to come up with a solution that is flexible and generic. We should not be touching these core structures every time some new attribute needs to be printed. Also, this patch is controversial for other reasons: - it adds bitwise logic, when it could more easily just add a new field (for example, caller_cpu) - it increases the size of all records by 4 bytes - it changes the internal structure in a way that breaks existing crash tools - for non-task contexts, the increased size is wasted John Ogness [0] https://lore.kernel.org/lkml/20200904082438.20707-1-changki.kim@samsung.com