From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B9563546C9 for ; Mon, 22 Jun 2026 12:50:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782132629; cv=none; b=BfUNSfOtRbRmqZSu18lshUtvHTgDq1SR5R5lv0ZF3FEAVmK58XLTclhHdawh7Cx6GZENI1YIHncjbqNqNC3yP9p8+pmXy26CpDJ0ov5w+BPQZQgedgq/jMQ0lPBBtbzku/YaTB+Tnv/2x5qBCgKoz2A4GMfUqtPgO6n1ICP0HhI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782132629; c=relaxed/simple; bh=nNut44sJA4u4K1PGL0VFKlU7etFQImxvDO0XpTdVr90=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rvVb6ZYtdYPb3V0XfJ2ZYe7nHX7YgF1XrKF53e1CrsWl8AUoNO6AZsBw/oDcmbNJ5pqH71nWogYh6GQWZ5PrjQdGjebiEMdE4Qo97p4EKASR9g1InG51MzlShMYcsZHn8UMbfaHqSuMEEZn1GsO4/JTCB3lCBcij//ZFFCdvvho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=a321xrSp; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="a321xrSp" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-492329c5514so17335135e9.1 for ; Mon, 22 Jun 2026 05:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1782132626; x=1782737426; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5TIz8kANAIvFIhDVkGAgGrxVZAqv0yMgR6pR95zBwRg=; b=a321xrSpTSsCzkj/4Cy5W2NYidRzy9STh6tRrZaakd98GQEtayHmp6BS0JexGPJIKV N+v6r0CMTK6McnuqLNodZbxQsGh+Ifb5/jsAgj4H6CDERjZ8w11xH1WfyhMGxJCk4wF+ YNEvPIh7QTo+HwBkcpsVs//OhgROTuVMoVO05O3FMVcmhRx7cvPMsNen8UtzP7vdW/zF jWvRCJ3APowkyk9QgefiYnQn2X2TzaIPIbuheun6jRh8QbZNLbLvFn9AKaxL6Npp0bYW o/WebjA2oqJ4RxHI0MCEHIAwPDBegjEJJd/L9LNhuOXH4AMjMIPpvC/SkKV413GVCyNX iJ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782132626; x=1782737426; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5TIz8kANAIvFIhDVkGAgGrxVZAqv0yMgR6pR95zBwRg=; b=reZTm2qbiXmGRpXWMgdL3vUXq05A0SBNmeSZaUy/bqzYPVoDMgbXTvsSToTus/eQSl 96bRetzBI/52soFKgyslERpjETBI55Drv6vNy0UvBPll4deP1abp3KOg/Sjn7TGOcYoy EeWh4AQjQpVyYiZgGKLdD98eT7NefyCgpZopH6Oo/t+2jwRz36KSRA7L3Wg1iYrLi2ub 9OGU3RxOpnuhN/hvy+vWm+10Oitxy2VdAE9pQa2GxLuRmgzUIf/CDZ1StXZFBKpKjDPI KbxAW3YG0md3HIvrMwV4WLW6Ls48xYnT/Llj2jQwqJbRdg1X84tk6pMJIcHz1hLbAEtU CJdw== X-Forwarded-Encrypted: i=1; AFNElJ9d0CLBt4upe0ezuiR6twWsb2EaWG785hfz2o8T5ZuzaUr0Af00Ts/+08sT2VR99P5CAM7JAF7CJzWH01c=@vger.kernel.org X-Gm-Message-State: AOJu0YypzKYQNiLbTu8jd5NqouLLl2mTb5O5xnBBfk7FHNCjMpdOfrKf BxLCpKD7ZpGmS576bvJSmge8H+RZBWgVqrm63fHtwec3aJih5vYZpk8cyi5uN2tJwEc= X-Gm-Gg: AfdE7cnu/ej/vEwbI+MPayYCKL1FQyxtBeqyfBQDRszBMyMSlxSTJtui12ehnOHmvC8 b/B0388n9zI2hzFVGG2gAmKsZURxFsMjR+j0E8UaYBXsBcuVOzGiU5R5EvekMZCjvcA/rWgDpiS 9pGtFAx6DxU+bGiSAjOR5U6VzYZ8cZ33Mluw3ZmXxXfWMvkypix+kM4P4lv/UINRYl2rFicy6SP T6SbgUJ0wLJCSLgvkPJpXKH2g4NZwV/pyaxgs59XS0yLS+S0Zuzl/UkrfoacuH79y/DekD8tZss z8sonc5OnrH0Y3GmmHchYDynU8bQhMCEsEbj9BMxmgZHur0gMpyHR5WBR9psIdjeP/4eEyqRAE8 L9eyqqVkE0hf5Ws/Qy/WrUWM1UlD2XPRis8W6O0HJ+MeKiVnOB/F5bnDxzyQcLXq37PiceV7PuQ zZvo0+PVnzkAT/TVD9aN2DzeiGka2sdDdL0WNtAHwiPjmW9id89AnSLnQV0wkXK0whvNd7opEcd fZRvldNSIMXqdKWMcvhofWoBMDTbv+b+qbdFstgILtAwSyvWtneA+F0btY= X-Received: by 2002:a05:600d:4448:20b0:489:32b:ac0b with SMTP id 5b1f17b1804b1-49240a09f71mr153110525e9.6.1782132625851; Mon, 22 Jun 2026 05:50:25 -0700 (PDT) Received: from ?IPV6:2a00:1028:838d:271e:8e3b:4aff:fe4c:a100? (dynamic-2a00-1028-838d-271e-8e3b-4aff-fe4c-a100.ipv6.o2.cz. [2a00:1028:838d:271e:8e3b:4aff:fe4c:a100]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49240084928sm306294445e9.15.2026.06.22.05.50.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2026 05:50:25 -0700 (PDT) Message-ID: <01b656a3-dcd7-48c7-96f0-e174cd2a2c48@suse.com> Date: Mon, 22 Jun 2026 14:50:24 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [GIT PULL] tracing: Updates for 7.2 To: Linus Torvalds Cc: Sebastian Andrzej Siewior , Luis Chamberlain , Daniel Gomez , Sami Tolvanen , John Ogness , Thomas Gleixner , Peter Zijlstra , Steven Rostedt , Yury Norov , LKML , Masami Hiramatsu , Mathieu Desnoyers , Ao Sun , David Carlier , Karl Mehltretter , Martin Kaiser , Pengpeng Hou , Qian-Yu Lin , Rik van Riel , Rosen Penev , Shuvam Pandey , Vineeth Pillai , Yash Suthar , Yu Peng References: <20260616180122.57a3b426@fedora> <20260619081513.3e4a1fb0@fedora> <20260619154025.h4BHc5wi@linutronix.de> <20260619183030.Hhxw5N5G@linutronix.de> Content-Language: en-US From: Petr Pavlu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/20/26 12:28 AM, Linus Torvalds wrote: > On Fri, 19 Jun 2026 at 12:07, Linus Torvalds > wrote: >> >> Now, we're not exactly doing great in this area, I'm afraid. To pick a >> random small core kernel file, we have this kind of disgusting >> situation: > > Actually, we have much worse cases. > > Doing a "make allmodconfig" will do all those '*.mod.c" files, which > are tiny generated files that just have some mod-info structure etc > for linking into the module. > > They're like ten lines of code. MODULE_INFO() and a 'struct module' > that gets linked in with the actual code. Auto-generated by > scropts/mod/modpost.c. > > And then they have > > #include > #include > #include > > and those three lines of include make them balloon into 3MB of code, > so building those *tiny* things takes forever. > > (Where "forever" is obviously relative - but it's disgustingly long > for something that should be instant). > > In fact, just a single > > #include > > and absolutely nothing else, will give you 2.8MB of output. > > (In contrast, the two other headers we include - export-internal.h and > compiler.h - result in 13kB of output. Yesh, it's 550 lines of pretty > random stuff, but it's not really all that bad. It's mostly just > really core type declarations, so it's all quite understandable) > > That module.h header situation is beyond disgusting - and yes, it's > very much noticeable in my build time. Adding some module maintainer > people, because this is bad, and I think it needs to be fixed. If I modify scripts/mod/modpost.c and comment out the logic in write_mod_c_file() so that it produces empty .mod.c files, I see that an allmodconfig build completes about 5% faster, so I agree that this contributes non-trivially to the build time. It should be possible to split the module.h header to avoid this indirect bloat in .mod.c files. Many members of the module struct are pointers, so it is sufficient to forward-declare their types. I expect the problem will be mostly with structures embedded in the module struct, such as kobject or latch_tree_node, where including their header files pulls in many others. I'll take a look at how to address this. -- Thanks, Petr