Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp88043lqt; Wed, 5 Jun 2024 18:43:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSoKrZYFl7tpYKU4YOcbhjJZUeQZoDax9DSZ6Q9OAaz1FClfGnSEjl11SI7ystYFCEE+4NePBie3piz7TS2SK0nVb22Q/RV7siZsAXGA== X-Google-Smtp-Source: AGHT+IEGcsz+OjvmIQY3naA7c7dTWvLraQPuru8FceM7fc2tLfmi7/JIZovAnaqEbZ70MZ/jPGsF X-Received: by 2002:a05:6871:3428:b0:24f:cfbb:2c29 with SMTP id 586e51a60fabf-251227a296amr4604819fac.29.1717638236027; Wed, 05 Jun 2024 18:43:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717638235; cv=pass; d=google.com; s=arc-20160816; b=kOgL2FgBs9zuS/qs8jd1U+ez1YE5eIDwyBKZv0TGlAM6USc0bmdHfk1gNvU7cgRtSj zVUJsjGAjrZBlOxYH94iT/NNRsfz4uGkZdLr3wXTQ909Y6XWu1egyo2/ES6XsUiac5hi dCBz7zOJahsZxHXjRfyWhwdTWielSP/3dLokr65qR2NJmdJoTFquAVq04RJluX/gjo1L 2OZSEFV0Zo8rSTxp06Efbv5tsizksT/vhYvieFD4DKavmsUOtjpRGjBf2BYgB0i+WokR FLWDsxT70ZCX2hJvjW0w8Lf6G7uOpCRAnmKwZGe8lX8Gg6G9a9PFk6nvJdbwRQvbazjk ZWWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=OqCet+2RNZcFx7ZwPXmhxOHC7QeQeO0SzDwAJ8PB5bY=; fh=JBezuglN3T0SVw/ISaWHnTZvH/5TlhnClxb0deCoYn4=; b=Ybe5xir5UVebROtvElBrT9zQgiOBYEFGGhBq3sE2gIm5msITnND6obJqajU1bN9Ceb kLGshy2NJNcPXj69R/cdA+IeJE67HJj0VQbBZfMWQehH/vTOReiZTWf7HQsxzNgVwC4K POiU4le1uODynq6Ytox1JsAlRvPQfsxsa3IA73dFXPxq+sYDN6gcHjjZnqvSzo+6Px93 e0x5BSI9ATmg7btno46PDwds4Fbf0eNRgdVHNCQCiNKvcSwydjApORRcoysZJnzpxByJ FClzimZhCn+jrzp9SqDDswixOVT1wsqwgHK7aIbz7VOUK7xS/W+9ynDpJuoPKfNfnEM6 JCkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203507-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203507-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de20831cc0si284904a12.1.2024.06.05.18.43.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 18:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203507-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203507-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203507-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 78F11285F4A for ; Thu, 6 Jun 2024 01:43:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 732871805A; Thu, 6 Jun 2024 01:43:36 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AE83BEEDB; Thu, 6 Jun 2024 01:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717638215; cv=none; b=bef72ZMolWjS1exCy6K7USv+Cg1WlOfniXz5PEYOLozAk/owXfflb1PizaGpP2cgmi+LJYAuaEhd49gK6L87Xopf0oylOndDP9rJH0t+8e6VS/jX1mOtd9qcKwgDBc6Ep4WUiBdg61pep9tE770B/BT3GevwMJlPgGyX4ZHpa1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717638215; c=relaxed/simple; bh=njaB7xwtRqM5zOvkd98x7fcmkQz3EohBYZ74D1OJmrE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ag59Kyqhh0Y0qvsTi7wR/n1DIwtS8oktj4g4CKKPWJa6NGaUHRaLDahdGgk/5r4r1sV4HTMQ9jbwToM2KOATid75U+jNZZC2aub7SXDnRYDS8En2wBPv3oO3ukKof5yJ936xqStuI21cA9eHO1M5fHScDAs8h3YXgpx4Z/CS6YQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE1A6C3277B; Thu, 6 Jun 2024 01:43:28 +0000 (UTC) Date: Wed, 5 Jun 2024 21:43:31 -0400 From: Steven Rostedt To: Andrew Lunn Cc: Jason Gunthorpe , Paolo Abeni , Mina Almasry , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Donald Hunter , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Andreas Larsson , Jesper Dangaard Brouer , Ilias Apalodimas , Masami Hiramatsu , Mathieu Desnoyers , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , Christian =?UTF-8?B?S8O2bmln?= , Pavel Begunkov , David Wei , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , Willem de Bruijn , Kaiyuan Zhang Subject: Re: [PATCH net-next v10 05/14] netdev: netdevice devmem allocator Message-ID: <20240605214331.34d9583e@gandalf.local.home> In-Reply-To: References: <20240530201616.1316526-1-almasrymina@google.com> <20240530201616.1316526-6-almasrymina@google.com> <20240604121551.07192993@gandalf.local.home> <20240604163158.GB21513@ziepe.ca> <20240604124243.66203a46@gandalf.local.home> <3be107ce-3d9f-4528-b9f7-1c9e38da0688@lunn.ch> <20240604202738.3aab6308@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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 On Wed, 5 Jun 2024 02:52:29 +0200 Andrew Lunn wrote: > > How is a compiler going to know that? > > It might have some heuristics to try to guess unlikely/likely, but > that is not what we are talking about here. > > How much difference did 'always_inline' and 'noinline' make? Hopefully > the likely is enough of a clue it should prefer to inline whatever is > in that branch, where as for the unlikely case it can do a function > call. Perhaps, but one of the issues was that I have lots of small functions that are used all over the place, and gcc tends to change them to function calls, instead of duplicating them. I did this analysis back in 2016, so maybe it became better. > > But compilers is not my thing, which is why i would reach out to the > compiler people and ask them, is it expected to get this wrong, could > it be made better? Well, I actually do work with the compiler folks, and we are actually trying to get a session at GNU Cauldron where Linux kernel folks can talk with the gcc compiler folks. I've stared at so many objdump outputs, that I can now pretty much see the assembly that my C code makes ;-) -- Steve