Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2507044pxb; Sun, 23 Jan 2022 06:56:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkGiqX8SDrNIVTg8mthO5eYzc7J8ciDhOGLrXZA1R9H5gCshe8bpw8ab1GE0k4sDijItLS X-Received: by 2002:a63:be49:: with SMTP id g9mr8936776pgo.375.1642949795420; Sun, 23 Jan 2022 06:56:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642949795; cv=none; d=google.com; s=arc-20160816; b=YrTMLngsCSEtotCsDwbOGXb48WsJVOZKM+xNJC8fKGqWpxMlf2r4rlzE3wlEVLPZjx M3pD4wtRu9y6ERvmFCH8wNC2DcMkFWSZGU/4bes0R4PaMEe5iVuxzIbOCj5vXxoVP/vr wy7WzA0CyckOsz4vYCaqUr3jsosLPkzO2Ngw1M4OdcA4VyQhNEkVivhr+rPOlk0yO8k0 fz3FaZ9Yn7UpfZV2g1brMl+NBs1PX2gmxhNs2nA/0m43Nlgcf2++wVYO3g8uRSb9jkB6 JTS0pyzOc3+WsiaSBrEnqxf4mSH/9JTAexA7frDS/9HbJwHwlCzrS7RfOCF+4pfRpYgZ u7Mg== 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:sender:dkim-signature; bh=pGa1w/JcNr5+C19JPD1ltZ3i6oBHm/zkLviRyQMY3Zg=; b=m5DQJiKUOP6RgZGOgi/8QUR00XcLPe7Fmvf90AFPBHy8WFWOfECFISyYWtaoNb6ijb bY1gv7LzIWyyD8lxM1HqzUPPwn3ej5iK4niOchHk2R6Vuhh5nOKgC7ceXJ2IkGpzhYjG RtP7kVLc356KAfV09/lSzmDDDOvolpLdzfZ2JHVE+l4U390Di6gvh6I2G1xZ/p1e9CHz bS9d3efcN8RmVzpoW2JFRD4Ldkk5JBmhBzt8ZbUn+GDdaIWE24Nidp1cEwmpQIekzHbk ZZrixcTydoFlpKDXDhgUnxs5/WhmSplOdtPy6JngzoYju4iC1SJRqoWY8EXIJ6bkvyNQ 2UmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h20HOSwv; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e128si11423200pgc.763.2022.01.23.06.56.23; Sun, 23 Jan 2022 06:56:35 -0800 (PST) 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=20210112 header.b=h20HOSwv; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234017AbiAVJSj (ORCPT + 99 others); Sat, 22 Jan 2022 04:18:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233964AbiAVJSP (ORCPT ); Sat, 22 Jan 2022 04:18:15 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87729C06173D; Sat, 22 Jan 2022 01:18:14 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id u24so1036857eds.11; Sat, 22 Jan 2022 01:18:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pGa1w/JcNr5+C19JPD1ltZ3i6oBHm/zkLviRyQMY3Zg=; b=h20HOSwvJblo2l9fGhQ5FY6wn7Yv91o6AqUUM4F69oJRPq03gVw93d3iavKGCeNCpi WcPfQSETbx+aNJAMcU5EqaYiHYdFLwgjX0NHQ/5D6Lmz5RUm4nWD/BG8wPe0/moJjxBX Nh8LT5bW8Wy5jLthdDGuqX3HK8+v9aNVZ+sN/ZvM3V7LGnypGjRq5iTplVNKaEQFMPHD bMEGUdTqYT0ckoY5ZmOYT34qvWlOwYCEf6q8i/Ve1EZa20Y5ItQiJG97Ar2qjnHuEYiN 9P31oaeKdUKmSRmz/Ygzwf4YyOGEgB+/ciRBdRRY7a/hJIenhPlW0NSN+34E6TipPhvP V+Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=pGa1w/JcNr5+C19JPD1ltZ3i6oBHm/zkLviRyQMY3Zg=; b=avYW+e1GprZ55SX+I3gvzLhKest8Htcx8eHeTDL1k03YRjdxWKVVK6i39O/9RwNP3Q sevDQOAhHYfgDNisycQpBHLeMtyk/+IwWir1rUEqQ+KyfPWFVdAMjdzVFANm5cWa5xYn EyAIXrLwNi7V5v/uo9AOwehEhWXyZiF5eyqdYwSyHng6m0PKf/vMi355+O2nq9XGLXdU jTGBXL/zKYJC6xbIOhyWD7iN2StjwiyYjGytbrn2n1kZQ2YbvI2jYJMc2hdl4D2RHtrM v9+3a6V1alEte0CB5YlNLMONvapo4quhRmTPnl5SNQF6JWwL0CUEGDr1Flv28wOfF1k3 qgAQ== X-Gm-Message-State: AOAM532OJwWrAsrG+IfLx6hb8hJcFaZzZKRwRNNdIPPmxgzUP20lQKPc lC6v519zu1d73ug2ryOG2l4= X-Received: by 2002:a05:6402:d0e:: with SMTP id eb14mr6555396edb.81.1642843092759; Sat, 22 Jan 2022 01:18:12 -0800 (PST) Received: from gmail.com (563BB7FA.dsl.pool.telekom.hu. [86.59.183.250]) by smtp.gmail.com with ESMTPSA id cr8sm3454129edb.47.2022.01.22.01.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jan 2022 01:18:12 -0800 (PST) Sender: Ingo Molnar Date: Sat, 22 Jan 2022 10:18:08 +0100 From: Ingo Molnar To: Arnd Bergmann Cc: Linux Kernel Mailing List , linux-arch , Linus Torvalds , Greg Kroah-Hartman , Nathan Chancellor , Andrew Morton , Peter Zijlstra , Ard Biesheuvel , Josh Poimboeuf , Jonathan Corbet Subject: Re: [ANNOUNCE] "Fast Kernel Headers" Tree -v2 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Arnd Bergmann wrote: > > If we include comments & line-markers then the bloat goes up by another > > ~2x: > > > > kepler:~/mingo.tip.git> ./st include/linux/sched.h > > #include | LOC: 2,186 | headers: 118 > > kepler:~/mingo.tip.git> ./st include/linux/sched.h > > #include | LOC: 4,092 | headers: 0 > > The metric I've been focusing on is bytes of the preprocessed header, > which is more sensitive to function definitions that get generated from > macros, and I multiply this by the number of inclusions (from scanning > the .file.o.cmd files). It probably helps to have a couple of metrics and > look at all of them occasionally to not miss something important. Actual inclusions don't just depend on .file.o.cmd files though, that won't catch indirect inclusions, right? > In the meantime, I have made some progress on reducing the headers > for arm64, on top of your tree from Jan 8, but I have not looked at > later changes from your side, and I need to work on this a bit more > to ensure this doesn't break other architectures. Sure & great! > For an arm64 allmodconfig build, my additional improvements on top > of yours are significant but not as good as I had hoped for, this > can still improve I hope: > > 5.16-rc8-vanilla 32640 seconds user, 3286 seconds sys > 5.16-rc8-mingo 22990 seconds user, 2304 seconds sys > 5.16-rc8-arnd 19007 seconds user, 1853 seconds sys ~71% build throughput speedup for allmodconfig is very impressive to me. :-) > As my tree builds any randconfig cleanly, [...] Yeah, same here - having a few thousand randconfig build tests is normal for each version: /* This file is auto generated, version 3288 */ #define UTS_MACHINE "x86_64" #define UTS_VERSION "#3288 Fri Jan 14 18:20:14 CET 2022" My testing is mostly concentrated on x86 - but I often test ARM64 randconfig as well. > I keep looking at different configs and find that this has a big impact, > some options end up eliminating most of the benefits until I add further > changes to clean up certain files. This happened with kasan, kprobes, and > lse-atomics for instance. After eliminating all circular includes, I was > also able to revisit my old script to visualize the inclusions, see[1] > for the current arm64 defconfig output. This version uses my arbitrary > metric as font-size, and uses labels for the number of inclusions. This is really nice! I was concentrating on optimizing a generic distro config - which doesn't include the tons of extreme instrumentation measures that allmodconfig includes but production distro kernels rarely do. allmodconfig definitely needs more work, but 71% is a pretty good starting point ... Feel free to send in patches, I can help with the testing too. Thanks, Ingo