From mboxrd@z Thu Jan 1 00:00:00 1970 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 64DA319CC24; Wed, 30 Oct 2024 23:48:09 +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=1730332089; cv=none; b=WC9ADJCEzGypMags45DqcnwFsZFByX0OmOGH5TmnQOp7WqRFIxZwC0ssXSYLDEoK9Q/DHe8YpWVztI1szE6jD/Z/YENGeqpom27WKa/Mv4vtXj/hs49w4H3fLWcHrZa6K2DeLh54iPTHquqVexI+75jdHomkl69UtHRUuSTyE98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730332089; c=relaxed/simple; bh=Q0wXyQGBlYip/F0j6/woGSioAXOUzqyfPJJC3tkOLK8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=elIlq3jrMuXnU4PN1FknX7VQtbi4ib0J8euyl4s+xf+N/WvCIL9jT3NYKDzX22OpLMfWjzPmR2k5T7xL1YZ0G0LH9Zo2hs3GLQ+50l46HmZ2eaXiszdPOAHZ6eVvKrRyG+3ldibAO0Jn5i/SNVok6fzUlsc36M34ysaKtdq8mi4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ju76Edax; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ju76Edax" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEA34C4CEF0; Wed, 30 Oct 2024 23:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730332089; bh=Q0wXyQGBlYip/F0j6/woGSioAXOUzqyfPJJC3tkOLK8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ju76EdaxYrc2VgAjivV0KVt2GMgCCgQhkFEfaJJ6/pgDxTefM1lg4Tf1OWyD6kJF1 KPs45HSaTf/dlBDXadIlmKLrd/PTXlvHaEPFN+6htEnDe9la3DhVDjvzJ08pFbHCu1 Mi9Dcrl+rhMsrI94lHkbmm+ltjVTd56lvqQYX2iMsa9T1VhTsDaczRIlDIIrjNFfwV BJFkhdoI7ChFFbj0fL95fN0enUv6F2jgu70AtVwj6XP/DlYWjcgdm+p8m6To/KCBGH 7u3hKM5vMU2n1gcpbXdQJ1gi5+guUy9KsxG9mMUy4fX4yx/ByjRBAgjJViZhPyf2di YfF8DVjTLFaVg== Date: Wed, 30 Oct 2024 16:48:05 -0700 From: Jakub Kicinski To: Caleb Sander Mateos Cc: Tal Gilboa , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Jonathan Corbet , Shay Agroskin , Arthur Kiyanovski , David Arinzon , Noam Dagan , Saeed Bishara , Andrew Lunn , Florian Fainelli , Broadcom internal kernel review list , Michael Chan , Doug Berger , Claudiu Manoil , Vladimir Oltean , Jian Shen , Salil Mehta , Jijie Shao , Tony Nguyen , Przemek Kitszel , Sunil Goutham , Geetha sowjanya , Subbaraya Sundeep , hariprasad , Felix Fietkau , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , Saeed Mahameed , Tariq Toukan , Leon Romanovsky , Louis Peens , Shannon Nelson , Brett Creeley , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Eugenio =?UTF-8?B?UMOpcmV6?= , Roy Pledge , Christophe Leroy , netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-rdma@vger.kernel.org, oss-drivers@corigine.com, virtualization@lists.linux.dev, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 2/2] dim: pass dim_sample to net_dim() by reference Message-ID: <20241030164805.40408945@kernel.org> In-Reply-To: <20241030194914.3268865-2-csander@purestorage.com> References: <20241030194914.3268865-1-csander@purestorage.com> <20241030194914.3268865-2-csander@purestorage.com> Precedence: bulk X-Mailing-List: netdev@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, 30 Oct 2024 13:49:08 -0600 Caleb Sander Mateos wrote: > net_dim() is currently passed a struct dim_sample argument by value. > struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64 > passes it on the stack. All callers have already initialized dim_sample > on the stack, so passing it by value requires pushing a duplicated copy > to the stack. Either witing to the stack and immediately reading it, or > perhaps dereferencing addresses relative to the stack pointer in a chain > of push instructions, seems to perform quite poorly. Looks like patch 1 didn't get CCed to netdev. Please repost? -- pw-bot: cr