Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp28921rbe; Wed, 28 Feb 2024 11:01:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWxYJGJJ/GpJvMdquWJFOJakbS1gFRS71YK0pB9iwvaM2SYhx3szOHu7730Tar+VUOrCYqPc0KdjeBxn0C5LR6yZZmKosSjTsJM8lZIyA== X-Google-Smtp-Source: AGHT+IFA8vVZsQoOGtIcDslbmXZGncw/EeN2GkMLhfainpDiGzEObjsGrXBmp8ThJOdaDRWGcJzl X-Received: by 2002:a6b:500b:0:b0:7c4:9c39:3ef6 with SMTP id e11-20020a6b500b000000b007c49c393ef6mr37058iob.17.1709146870461; Wed, 28 Feb 2024 11:01:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709146870; cv=pass; d=google.com; s=arc-20160816; b=a3FchmBF71xB42/7Ywyv03XUU8dYjw/0qs5VomtBq3bjELfdrRDy1uDHYeXEfGUmxG ueW809c+fSR8fXz3Tzvk+UV0B4ivlXlacPumX+qBHZ0JY5QT29aFV2816UuD10iTBOdy Ca89S16JfSAkbdDYp6jB8JoaTyvT7ZcSoFZYk6wznuL2X6Yap+CyWHsV/NvzvpJLhF6y F6NVOaaaUl9l3IRw67zYXFeSYiEnYiKgO40G58yrrxYiKYNYxDnXn98RKQE3kEAxVOam 71pOFOECRh9WPPKYT77p7A9i0aAelv0VNSZbG64+hds4kSAWX5uvXX5tUB3yId+AZSQa fndw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=gtoInaf72x6yiW+pT4EKz2V498/f1L4fXxY0tgEtKWc=; fh=lQ1i2traL5lZ76/abu0QCxfoYFTGPx5arIuWWgsUwLA=; b=WwLRgslUtPVuLf/pSLcyXFE1R6mCQvfpxHCBMoKd4WrtIVaZRehGTB3YBakcyE490d 1tOvZRoFD3PT62Gj47cHHpK3CpftCATQDoAff3DrpG8kNLftfiwBSIHfStm3Bg3QmkLs nLXv2+ygYQUegICamW9PtLGZ9giy9OmiCdokQUTb/PgyYZPN3NtD/HXj+XNWqsz4SNDP IG2E8cXb5ftP2q3belVutXbmahkW2cX8MqcGKvODnAUFNhPOyxKy9n/XRqWgRkG28cHy dG7Xxetrd08uTw9hVTNL+Jt+EoFOQWUP377pwg9XrPnMRfGJ9NenlkCqMK+MiZhEx5YC DGdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZkeVziyG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85455-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id fq23-20020a056638651700b0047469c893f6si2897389jab.36.2024.02.28.11.01.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:01:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85455-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZkeVziyG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85455-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7199C288DFC for ; Wed, 28 Feb 2024 17:41:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB9B015D5AE; Wed, 28 Feb 2024 17:41:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZkeVziyG" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B5B915B973; Wed, 28 Feb 2024 17:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709142096; cv=none; b=hH66DJ1KbgxG3LTNp2nejG03v+Qpd1bNAZgN6oNTebWwwC7WOBM9Kza/SrAFw3IH/6nzM1v4OiSgxFQ9w9AiIVUl/VuzI1RQaWUlyo/jNRrRdkjkLJkO12pTSpDYZlxMhMOj3zuvFvl0obCNpsHBvxS0o7D7sFc0mrfPj2sGvjk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709142096; c=relaxed/simple; bh=ou/5HGkcYAX9xXteO2KtcJI6WR6PgAsdQKJqTBPuL6I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s1QXMtqWKxm0r3k5eG2GwM8hM0oFZIoWwoPr7T8Z2s4Z/PZLYVoCQ/iwaeGBgfQPYv6TdWoADrWKHwVdEfdMXdAkEoeZopjBPQQ6HLDWf0kDUWyZvDHlXtbq0Zmk1kone5eDhd6G9257v8XTA6XcLbtdgIkeOaSUNblbxkgh0o0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZkeVziyG; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709142095; x=1740678095; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ou/5HGkcYAX9xXteO2KtcJI6WR6PgAsdQKJqTBPuL6I=; b=ZkeVziyG5PXD+k/kjSWzt8F6kvsh8MeQqZycTBoSxxRnRlXRj4l3OLks EqhYH/AKmzrtR4eaS/PEAdAimfzL8ZlZ9Miqeew02Npc+OgxtykgOf0yN kjiddUE3h9ZNw9wozIvQtXkkChnYnOMKQ5BLUkJ8JKRz8Yqam6jZll6D1 0pJcTWXQefwC0ufLBSDNvdjhqS/pfB/DXt3wvYMauiuE73te6PHYVehW/ v9MLuFm/R1xS1ztwFw060VUa8GIcp+5m6sDBN/HI+M1Tdh7L2T9vntyk2 wqUTIuxkB22zq5CBW4UpWEj75Z4SQqenZv+6DZiWuZVKdbepkfAt/ikL0 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="14998058" X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="14998058" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 09:41:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="913956560" X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="913956560" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 09:41:30 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rfNvq-00000008Hpf-41CM; Wed, 28 Feb 2024 19:41:26 +0200 Date: Wed, 28 Feb 2024 19:41:26 +0200 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Chris Down , Petr Mladek , Greg Kroah-Hartman , Jessica Yu , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jason Baron , Jim Cromie , Ilya Dryomov , Xiubo Li , Jeff Layton , linux-kernel@vger.kernel.org, ceph-devel@vger.kernel.org Subject: Re: [PATCH 0/4] printk_index: Fix false positives Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Feb 28, 2024 at 03:00:01PM +0100, Geert Uytterhoeven wrote: > Hi all, > > When printk-indexing is enabled, each printk() invocation emits a > pi_entry structure, containing the format string and other information > related to its location in the kernel sources. This is even true when > the printk() is protected by an always-false check, as is typically the > case for debug messages: while the actual code to print the message is > optimized out by the compiler, the pi_entry structure is still emitted. > Hence when debugging is disabled, this leads to the inclusion in the > index of lots of printk formats that cannot be emitted by the current > kernel. > > This series fixes that for the common debug helpers under include/. > It reduces the size of an arm64 defconfig kernel with > CONFIG_PRINTK_INDEX=y by ca. 1.5 MiB, or 28% of the overhead of > enabling CONFIG_PRINTK_INDEX=y. > > Notes: > - netdev_(v)dbg() and netif_(v)dbg() are not affected, as > net{dev,if}_printk() do not implement printk-indexing, except > for the single global internal instance of __netdev_printk(). > - This series fixes only debug code in global header files under > include/. There are more cases to fix in subsystem-specific header > files and in sources files. The whole series makes a lot of sense and gives a good examples for above mentioned subsystem specific code on how to do it in a better way. Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko