Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp123284lqe; Tue, 9 Apr 2024 17:22:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUrJCJmd6KXJTS5L7vFca7dloRPBiQTpaU0eEAiXkyiNvuKh6Wopk7AjMyV6m6aO/Aq9erhJIJzAkFUf2hzDnJ4CB5AJFvNJoc9FX4AA== X-Google-Smtp-Source: AGHT+IEin0nOJ1Pj3KeQ6iiNUP1kqqfg7dVoX34uIilxBzJeIAJHFCiLCFRuAYE4Nn09xqY0vnHe X-Received: by 2002:a05:6870:1616:b0:22e:74b5:6593 with SMTP id b22-20020a056870161600b0022e74b56593mr1404758oae.47.1712708523128; Tue, 09 Apr 2024 17:22:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712708523; cv=pass; d=google.com; s=arc-20160816; b=JI49cBboakPCKXH+2clcxL5a8iqiHFu2cCCgvKI523m+T1pyQmmQF31yik4btrXctK 99HO47Ry0UsNmdL6IW5xPtYz1PCnFQgpxsqGTZKBju0Idz1ni9YZupQVKhF2GmJ6fQL8 VDYc2zR81KyZ8LPH/5bD3P13BRQIbISk1RmYzJZx3LBYlu8QqzQj67ACoLfPgP+/zQ0g 0RXGTYbD7BDYbgpafnTEwCTYvUztMKqpIODuRLtQSDR/kcywYmAps5SrK0ZGqPmDD1RJ KJdijycDelXruc7fIpyhul7JsMdExLWA8RbPp4zxgsQxk/ACM6zXGxfakRKBJ+wU50s+ Mzzg== 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:dkim-signature; bh=nZ9kQycTp9ceTiaSi9ZZ8GNZyBle6fQelL7bAKfThRo=; fh=jlAqRH2z+jgxdbA24wUf8Zm+/RZmCK/U1PBlc/DHOgI=; b=JuGr0Mx846NF9nt4mWPiyApVUVGF0QaSKBD2a6VHdDwMCscdUByaznFuVvIgOWuAo4 ++n7mK3dNeoP/w+JG4IMY3MSo6OU0BPjXHL4AX46PD6ICLRx3r6TNlVn+wuO17B0PEBb z/yw+mz3xXhEj0KEikogmZfpHiSCoNwJO5B6JCqpnrDHo8Fn7qFGoDx5Y7b3cXVsp1zN NiyCzM3IuOkAWjSLKWgbuewXok+6VZWoazIP4zY8I6+pSGoKNNo4+zOXf7PBTG3upXGa XR08X1MStz6NiXADlSRshSOUNZImQb5o/RHEPTCWL7KNsK/qRlSBBQQ+TbuPNQdHZnYy ri0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rf/VLZPN"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-137754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h13-20020aa786cd000000b006e6b1833736si9419663pfo.215.2024.04.09.17.22.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 17:22:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rf/VLZPN"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-137754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 01EBFB22311 for ; Wed, 10 Apr 2024 00:22:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C989633; Wed, 10 Apr 2024 00:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rf/VLZPN" 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 2E0877F; Wed, 10 Apr 2024 00:21:50 +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=1712708511; cv=none; b=D+6BhaXxDVY+wFVPq2EO5iU8ueLdfwa7WqJW9q6241zruT60OeICSUT+J6VJrFP8iGEEI0zAsUnN/DNJSCRXlcVn/C+THlDbDSj3fh41851WpqHxyeTxOZx18cY9VCcgz/rPPSShndAIyY/5C44D+9pmm25++UlsCTZUcqP8pyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712708511; c=relaxed/simple; bh=gzUOWwz3tviqyMlmwEHpoHDPsNyvzfup7Ce/HPd7+eI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=muU9COo2gL9xsherK4wl6L6JT+z6rAfrepQ+IUpAtA1dQJGCnMd3jrLSPdxeGaTGuclbl/zkQaiWkjNtwytWHU2zaFLOkRRD9L79PCNuKyqtcN6EYlDNaunwIDungrTKDtyfJhf2wSknVp6QeTdAZoh4Wn1TbM6og+ZByBLbvUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rf/VLZPN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5157EC433F1; Wed, 10 Apr 2024 00:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712708510; bh=gzUOWwz3tviqyMlmwEHpoHDPsNyvzfup7Ce/HPd7+eI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rf/VLZPNe3KM7PuQkA/waKmvEJyyKyi/21q+CMesC55RySW/yz2jR6t7SExBKRvFs lgInRbwk6OZrp2DTPBYBekxJJ2rMfYoFKfTZ++r6vSAjVh+32+9xnzjdxF6RXODSEE GWhCdzugCYEFm1/n8GI52L3gy7ILDjWGjkjZHYN1bFj2Y6NMXgYZn7bvpWkvTRbMTB QRQMHMGJ69KP70XwgAVhu+iBLCp33YUHS/DkdMg37gJtfMoXOR7AaVahU8ZBbUCLVv hOokROauum4PUqwj4V9y/GYmAZ7+k+WOTOkeGoJ2jKqli8rvJQ3unrYU1DpDiVEmHv S+Q4LpUMT8TXA== Date: Tue, 9 Apr 2024 17:21:49 -0700 From: Jakub Kicinski To: Breno Leitao Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 4/4] net: dqs: make struct dql more cache efficient Message-ID: <20240409172149.6f285b68@kernel.org> In-Reply-To: <20240408172605.635508-5-leitao@debian.org> References: <20240408172605.635508-1-leitao@debian.org> <20240408172605.635508-5-leitao@debian.org> 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 Mon, 8 Apr 2024 10:25:56 -0700 Breno Leitao wrote: > With the previous change, struct dqs->stall_thrs will be in the hot path > (at queue side), even if DQS is disabled. > > The other fields accessed in this function (last_obj_cnt and num_queued) > are in the first cache line, let's move this field (stall_thrs) to the > very first cache line, since there is a hole there. > > This does not change the structure size, since it moves an short (2 > bytes) to 4-bytes whole in the first cache line. Doesn't this move the cache line bouncing problem to the other side? Eric said "copy" I read that as "have two fields with the same value". I think it's single digit number of alu instructions we'd be saving here, not super convinced patch 3 is the right trade off...