From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.stoffel.org (mail.stoffel.org [172.104.24.175]) (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 C5E3F43F4A3; Mon, 14 Sep 2026 15:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.104.24.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789398545; cv=none; b=bahhZWxzIiz5d6tXHKjpC7U0CewQVH8N9I+mFawoImRwkwk1hyrgSvYN2no46Wd7Ay4hckoAOcf1zWA2Yl0ReXFz92aB8KltAaA50i1sL3iB5+RuBjpSmWKYBlzqqn+NwUKSOKl3V5cu5wdYd5F4g/x7gQ56XI5aie6OarYSxxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789398545; c=relaxed/simple; bh=oMblGF1PmYRaqle4YPaaEqUlpIDejeN8jfSd3IyEo/E=; h=MIME-Version:Content-Type:Message-ID:Date:From:To:Cc:Subject: In-Reply-To:References; b=PV+YwHWcZsjYG6fVGWebIf+OfmGG36YDARmOu6C4ZhqwT0tyWj+pZNg9rkcpTWRDGpB/GI/TKn2pk9rsyS7ybWh+hG9q4/X1P/gOLyg490Qr01eNgzGMpGBQzjjNspf3YyPu4af4kZZK+aTHTVGgTilGzYwMFisT1G3KiAylC44= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=stoffel.org; spf=pass smtp.mailfrom=stoffel.org; dkim=pass (2048-bit key) header.d=stoffel.org header.i=@stoffel.org header.b=AlmtH9ST; arc=none smtp.client-ip=172.104.24.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=stoffel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=stoffel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=stoffel.org header.i=@stoffel.org header.b="AlmtH9ST" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=stoffel.org; i=@stoffel.org; q=dns/txt; s=20250308; t=1789398143; h=mime-version : content-type : content-transfer-encoding : message-id : date : from : to : cc : subject : in-reply-to : references : from; bh=oMblGF1PmYRaqle4YPaaEqUlpIDejeN8jfSd3IyEo/E=; b=AlmtH9STTB3sBPP31THd4Ukf5Z6t561oZCkY6InocAjV6FJV0GlJpESrVaoEiZ4A2uvYj gSessr0w8EU13qxN0B+jYQ20yXsLhCqUZutbGy7AcGcD5CFenB+bVoo/1m8Bw/R1ZtoWetF sBmKOUI3nx0KxE7wUcDCF+5n4994xds9o7lSQH/T2399oBGJXN2k3kZ8PCGsCP8feOVSZt7 E2jqE9cJAeF1HOKpro5FXdEZy3YI3ScbXELaBw6grc9sla2gt2x7VXc0k45gBGa5H3OmWN9 QSHUKS/Lr8CJN8h1E+WssVpWqEPHuNKBoEAReWkV8A5H3NgyUYydzjMKYCNw== Received: from quad.stoffel.org (unknown [24.177.6.168]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mail.stoffel.org (Postfix) with ESMTPSA id 929541EB4A; Mon, 14 Sep 2026 11:02:23 -0400 (EDT) Received: by quad.stoffel.org (Postfix, from userid 1000) id E573BA3288; Mon, 14 Sep 2026 11:02:22 -0400 (EDT) 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-Transfer-Encoding: 7bit Message-ID: <27304.3198.867048.379684@quad.stoffel.home> Date: Mon, 14 Sep 2026 11:02:22 -0400 From: "John Stoffel" To: "Lorenzo Stoakes (ARM)" Cc: Linus Torvalds , Nathan Chancellor , Nicolas Schier , Nick Desaulniers , Bill Wendling , Justin Stitt , Masahiro Yamada , Alexey Gladkov , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Catalin Marinas , Will Deacon , Mark Rutland , Ard Biesheuvel , Ilias Apalodimas , Josh Poimboeuf , Peter Zijlstra , Miguel Ojeda , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur =?iso-8859-1?Q?=D6zkan?= , Jonathan Corbet , Randy Dunlap , Kees Cook , "Gustavo A. R. Silva" , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Jens Axboe , linux-hardening@vger.kernel.org X-Clacks-Overhead: GNU Terry Pratchett Subject: Re: [PATCH v2 11/21] kbuild: avoid re-running compiler and linker probes In-Reply-To: <20260914-build-speedup-v2-11-39817ec5db23@kernel.org> References: <20260914-build-speedup-v2-0-39817ec5db23@kernel.org> <20260914-build-speedup-v2-11-39817ec5db23@kernel.org> X-Mailer: VM 8.3.3snapshot under GNU Emacs 28.2 (x86_64-pc-linux-gnu) >>>>> "Lorenzo" == Lorenzo Stoakes (ARM) writes: > Each kernel make invocation begins with ~30 compiler and linker runs each > of which performs duplicate probe for a number of compiler and linker > options. > This is useless work - the compiler and its version is known, so use these > to determine which options are available, once. > A convention already exists for this - CC_HAS_xxx, LD_HAS_xxx in Kconfig > files (for example, CC_HAS_COUNTED_BY), so convert these probes to Kconfig > options where appropriate. > This change avoids a sublte issue with ppc32 (big endian) - clang doesn't ^^^^^^ subtle > accept -fno-stack-clash-protection on this sub-target, so keep this option > in the Makefile. > With gcc and clang, defconfig and allmodconfig, the recorded command > lines are unchanged, a build with nothing to do rebuilds nothing and W=1 > continues to function correctly. > Doing this improves all builds, but has a particularly positive impact on > no-op builds (builds where nothing has changed). > Whole build, 128-thread Threadripper 9980X, best of N runs: > before after delta > ------------------------------- > x86 defconfig, no-op make, gcc 0.78s 0.60s -0.18s (-23%) > x86 defconfig, no-op make, clang 0.94s 0.66s -0.28s (-30%) > x86 defconfig, touch mm/vma.c, gcc 8.6s 8.5s -0.16s (-2%) > x86 defconfig, touch mm/vma.c, clang 8.0s 7.7s -0.24s (-3%) > x86 defconfig, clean, clang 29.8s 29.4s -0.37s (-1%) > x86 allmodconfig, no-op make, gcc 12.9s 12.7s -0.23s (-2%) > x86 allmodconfig, no-op make, clang 14.2s 13.9s -0.29s (-2%) > x86 allmodconfig, touch mm/vma.c, clang 32.2s 31.9s -0.30s (-1%) Are these deltas just per-patch, but cumulative with all the previous patches applied?