From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 B837D3612E3 for ; Fri, 17 Jul 2026 16:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784307425; cv=none; b=F6KbGx9BMphXI59DrxtTAmTdvGEzzqv40we5tkuqkPMTbC4nRxCJFQDDOfIru0LxIbhM5gOYQrWXkZkUoP8xmmvQ513BKY77LcP9xrWKBXsh6/OX5ZHqKcy2jIvB0Xa51/N+Z5TtfoDfaHslzcnYdzmZZBaa9W7Ipw9jry5eviQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784307425; c=relaxed/simple; bh=wKs36SOVOHO3LJ8mNUlux8QFeak+dkTNaXb1CzDcfxg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PKGgD1crkoctbA/KKwT8o1slPvsNRRZjTWod3Y1neOxhcfQMWw9IrV6BmAnYbpA2URVSS+hUZP6t/XbrVBCvkcrw0u93/4J6Q8WWyEB7mZfq0jrEz+FhBUzE0KtOc2eDVVbZKh5aQJELK/gCD/D1kco7ttv5w3uw82miRe88GQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=gsUQx8IV; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gsUQx8IV" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-84536ecfc5bso4852673b3a.2 for ; Fri, 17 Jul 2026 09:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784307424; x=1784912224; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=jjQtERwpEh0m+PQ7Nbhz5JQWbFkPp2mGwWfv53pig2A=; b=gsUQx8IV9nvoQNaRbJqUTT3p3FgXDSSYDd/b1oGAXQbiLg1CXpbs/Fttx0dh8SdRHy oJryR/zEbQ1TlgjgbCna8fclAzncSF564bDR6Ct7q11Pxv/RMbldjoUqw8WeQr/nOH1Y IXLIuuwpC3aB6IWyXfg3camudzpWbDiWtwY86h07Wvbs7FrAtSHKHIR8qEu8iAbCGikT jIBP892WJnlx2l+l5+/evTZo83g+B1XYxJi7YBnMkvSj4Rr11OmvJI/fwAwg0ER9Wceg pc/mJA1MHgchFDQKS0n86ftrpHiO8QHIEKrQGUCv60dMbqbG/dv7ri8do9zzfo/IEvNs 5Lrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784307424; x=1784912224; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jjQtERwpEh0m+PQ7Nbhz5JQWbFkPp2mGwWfv53pig2A=; b=FOJhejVSd19byOubMoARalMlglpL3VKntutmlHwraQMus78roCAe+FH2Leghym7fPd xtsGzIJJ5VzbNwg3UPBQ/L7yWBt+YbOgP2hWfNV7Ziu4mG4K4tVMxugqYRXK204xpqAe uk9A4LFonSVfmAwk4srSvseI9XRDHgxa2h8eEiWOO+CIP2Pn0ByRA48fIHULAjtDB0HA xr3ASR5kWX/G3802Vvgh1hA9pcEOf8ZwWziF5c+x4evrEEB5FSidXPA3Q300JYlghgEl 3kUfsgQGKuhX8Bm+LJYPL4jgKe6mBqc55UhnobIbVE0lKdLKecC/KCSwbq5nknEc6rbu WGzA== X-Forwarded-Encrypted: i=1; AHgh+RoQPRlcSK3t0xzsg7yhvScD5T3eX7RX1Q1vKfiJveOlqF+BtdJAx+kmoh+DNClpIUfQBtW5UrqtEzasJ/A=@vger.kernel.org X-Gm-Message-State: AOJu0YwQFTVUcaLR3f/utdnQ++CMcogygB/rabX/qiM+Z2CePEgPgnOb LkMLtlXnwAL9pWbmW3WMDHAa/rX0tmdtOWdvJalIMbxFLdD5qkBErWF1NWZqirFqBFF9wM5eY6O 9CdQfdiqE X-Gm-Gg: AfdE7ckqkDQvD0A25A7x5w7worQ7qmir//iZZSPS5DkyLmZ1KpTnMYkeF8FImSUFGSn ZruWczYVeII/HtTUk70A+ti4UyYUhlrsJOcd4NtBTluywDOOEX9AzHOgUmknEGPfKkkYtf9P96a qIohatU+UfdVvJ6SrOj4XmWFJprm8s+HVVOP2Gh0iwtSfEt0Y9tqvP/jzvg3zEOfel2K4FGvtlu ImDRklQYICmd5o6ZAOJQjYIa4sfNO4W4NPXUiEY9QpSce/xufQ4biBJqpltOaWTziOqNQV4TAiC 0WzTAxjJChLPtgLnaaV03hRPRcN7uN/u75NN2jSFJ553VE3YyA8SYJxr4gIxMBhU6YfbvII77NB MupawO4ChYBL8iu2qugdhqrEk1QIvymYYcK+4aeexdWmj0KBTBkzHo8VBK7VF39Y41TVpvi+qj2 gbShmPSqAzi1aRIxMTNzXYKXbLPH8aJLgfMSQh79fsHa9044YcP90G+qv+5LGJB4TIhuwv247zh C11To2Z17MYOUBcD5jCIj2lzQ== X-Received: by 2002:a05:6a00:421b:b0:848:5010:ad3a with SMTP id d2e1a72fcca58-84c294a6dd6mr4175030b3a.58.1784307423560; Fri, 17 Jul 2026 09:57:03 -0700 (PDT) Received: from google.com ([2a00:79e0:2e87:6:93e6:5c88:4a97:3393]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84c2af30bd6sm1442066b3a.39.2026.07.17.09.57.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2026 09:57:02 -0700 (PDT) Date: Fri, 17 Jul 2026 09:56:57 -0700 From: Nick Desaulniers To: Eric Dumazet Cc: David Laight , Andrew Morton , linux-kernel , netdev@vger.kernel.org, Jakub Kicinski , Eric Dumazet , Paolo Abeni , Nicolas Pitre , nathan@kernel.org, ajordanr@google.com Subject: Re: [PATCH] compiler_types: Introduce inline_for_performance Message-ID: References: <20260118152448.2560414-1-edumazet@google.com> <20260118114724.cb7b7081109e88d4fa3c5836@linux-foundation.org> <20260118225802.5e658c2a@pumpkin> <20260118160125.82f645575f8327651be95070@linux-foundation.org> <20260119093339.024f8d57@pumpkin> 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: On Mon, Jan 19, 2026 at 11:33:29AM +0100, Eric Dumazet wrote: > > Many __always_inline came because of clang's reluctance to inline > > small things, even if the resulting code size is bigger and slower. > > > > It is a bit unclear, this seems to happen when callers are 'big > > enough'. Haha, yes, and I've read LLVM's inline cost model before and "a bit unclear" is how I feel about it. At this point, some of your Google compatriots have even resorted to AI for inlining. https://arxiv.org/pdf/2101.04808 > > noinstr (callers) functions are also a problem. > > > > Let's take the list_add() call from dev_gro_receive() : clang does not > > inline it, for some reason. > > > > After adding __always_inline to list_add() and __list_add() we have > > smaller and more efficient code, > > for real workloads, not only benchmarks. Yeah, ChromeOS is hitting this now, too. They're deploying AutoFDO where you collect traces with LBR (x86) / ETM,TRBE,BRBE,SPE (ARM) then feed that back into the compiler. Then they're getting modpost warnings from section mismatches when constant propagation sinks addresses of initdata globals into specialized copies of list_add that are then not inlined (so not placed in .init). https://github.com/ClangBuiltLinux/linux/issues/2173 I think list_add, __list_add, and probably __list_del_entry_valid should be always_inline, possibly except for the different definitions when CONFIG_LIST_HARDENED is set.