From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (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 612C91DF27F; Sun, 9 Nov 2025 17:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762709748; cv=none; b=AjxrVU+seaWcWu12UQ+et0rLOSk3Pashw0ybLUTNxpItq2P0tb5kNfg3i7lsXZYhhUKrfPKYusdR8QfWkt/cCYRzAEFOU9YhHWM45GWCU5+Er8XGmse7qVKXY370xK8B4fLxTxdGNiGRGrjxR8AEr1jJDr9da8+9DsuzVzDU3Dg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762709748; c=relaxed/simple; bh=SX5qwi6eNiE8f8w3vxCMss5uGddaU6pL2Sh1O+bLbjg=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=Ujk1D40+iH1jxYXhVfi+BrEWyz8ELbnAkPSEvYIctAayp0CDd6KFjCInkgjqLcqQSSplNvzsXBKG1iGXClTU/bET4cC/7mV6/PUAjks0kMFiC+Us63YBzGwHMwCokeXD50/imdd3YZ2DeIMwbE4xRHu4GcgvBHZni05rmZjblN8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=gKnpuhGp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Uq4E6ndl; arc=none smtp.client-ip=202.12.124.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="gKnpuhGp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Uq4E6ndl" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 23FE37A00B0; Sun, 9 Nov 2025 12:35:45 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Sun, 09 Nov 2025 12:35:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1762709745; x=1762796145; bh=zkWdqhs5qH8DQ5ZU8oXdGGm7z8JLhJ4sUco0+8wMPGI=; b= gKnpuhGp2ATsb733vArbYloqQv3B7wkoOXcOG8R0466GWKLNpKoIBFztbEuthP0z /C2OKbiRNIIO4rAgf3lDV76FvNBnqL0B92TiQf1Nvb5kvY95tKdEKCsxvoFTV4Lr NfyMk7ghZOoCBjAcZdxm1FYFeDMEyv1fwRlWsbd0jPUpSNjmsSuqY7IFsMRuw76K O0x33vwxAIclfLwtRriBpqcLswG4+FUvulZSk1kwCjjOiOMfL2RD71XvNkxESLT3 6DtTQPHcC2ikfwjlD1gH1DqEXOxTrle5D6ewoU6hKt3xxkagqP3Qc6kmFHbmOWsk LmGg1YtOi+FOCT7XQ9fMCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1762709745; x= 1762796145; bh=zkWdqhs5qH8DQ5ZU8oXdGGm7z8JLhJ4sUco0+8wMPGI=; b=U q4E6ndlRwyc6WM9yDJcTjxjc2euuF6IQDBJK73X4ZMPCTulkxrHGhvurVMB5rwJ5 iedSIPqIxBrvr3VhBG4ksxLL+REgOkxE0iN+hJqVGaxkMpu9uADFCp9d7lc2J4Qo JqSbfUSaYgyrp9mE98suHlUy0TxXEYf4V2OhRv1v1/4GQ9yv2JAw2+52t0SdB9IU COeQW+a99Ctxr+hVBOCOHV7dNvJC5btQlRc6/t/b5rC4MXd4gAkh3V+PYQTPJl3p x1/xNSccmgn/ia32xWSRDRzmRiwZ20fXCVnoiGQpJ+jCTwyjZ51jMfQbP4Z2nvpr VpG75lfqP1cTT31x3yLsg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduleeitdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhepuefgiedtueetkeegkefgteegvefhtefhvdfhfeeuffekvddtfefhfeejueekkeet necuffhomhgrihhnpehsthgrtghkohhvvghrfhhlohifrdgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdgu vgdpnhgspghrtghpthhtohepudeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hlihhnuhigqdhrihhstghvsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghp thhtoheplhhlvhhmsehlihhsthhsrdhlihhnuhigrdguvghvpdhrtghpthhtoheplhhorh gvnhiiohdrshhtohgrkhgvshesohhrrggtlhgvrdgtohhmpdhrtghpthhtoheprggrlhgs vghrshhhsehrvgguhhgrthdrtghomhdprhgtphhtthhopegurghvihgusehrvgguhhgrth drtghomhdprhgtphhtthhopehjuhhrihdrlhgvlhhlihesrhgvughhrghtrdgtohhmpdhr tghpthhtohepmhhinhhgohesrhgvughhrghtrdgtohhmpdhrtghpthhtohepthhhuhhthh esrhgvughhrghtrdgtohhmpdhrtghpthhtohepvhhstghhnhgvihgusehrvgguhhgrthdr tghomh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id D39AC700065; Sun, 9 Nov 2025 12:35:43 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: APT2ySTFY01B Date: Sun, 09 Nov 2025 18:35:23 +0100 From: "Arnd Bergmann" To: "Xie Yuanbin" , "Peter Zijlstra" , "David Hildenbrand" , "Thomas Gleixner" , "Segher Boessenkool" , riel@surriel.com, "Russell King" , "Mathieu Desnoyers" , "Paul E. McKenney" , pjw@kernel.org, "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" , "Heiko Carstens" , gor@linux.ibm.com, "Alexander Gordeev" , "Christian Borntraeger" , "Sven Schnelle" , "David S . Miller" , "Andreas Larsson" , "Andy Lutomirski" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , "H. Peter Anvin" , "Arnaldo Carvalho de Melo" , "Namhyung Kim" , "Mark Rutland" , "Alexander Shishkin" , "Jiri Olsa" , "Ian Rogers" , "Adrian Hunter" , "James Clark" , "Anna-Maria Gleixner" , "Frederic Weisbecker" , "Juri Lelli" , "Vincent Guittot" , "Dietmar Eggemann" , "Steven Rostedt" , "Benjamin Segall" , "Mel Gorman" , "Valentin Schneider" , "Nathan Chancellor" , "Nick Desaulniers" , "Bill Wendling" , "Justin Stitt" , "Thomas Huth" , "Christian Brauner" , "Jeff Layton" , "Andrey Albershteyn" , "Andrew Morton" , david@kernel.org, "Lorenzo Stoakes" , max.kellermann@ionos.com, "Ryan Roberts" , nysal@linux.ibm.com, "Uladzislau Rezki (Sony)" Cc: x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev, "Will Deacon" Message-Id: In-Reply-To: <20251109170402.145012-1-qq570070308@gmail.com> References: <20251109113152.GA2545891@noisy.programming.kicks-ass.net> <20251109170402.145012-1-qq570070308@gmail.com> Subject: Re: [PATCH v2 3/4] Provide the always inline version of some functions Content-Type: text/plain Content-Transfer-Encoding: 7bit On Sun, Nov 9, 2025, at 18:04, Xie Yuanbin wrote: > On Sun, 9 Nov 2025 12:31:52 +0100, Peter Zijlstra wrote: > Adding the always-inline version of these functions can provide better > guidance for compiler optimization, but it does indeed lead to more > complex code. > The best solution may be to prompt the compiler to always inline at a > specific calling point through some keyword. > I noticed that there are also people discussing this issue on stackerflow > , but it seems that the current compiler does not have such a feature. > Link: https://stackoverflow.com/questions/14571593 You can mark the caller as __attribute__((flatten)) to force all functions to be inlined into that one if possible. I don't know if that would be helpful or desired here though. Arnd