From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9C57C433E7 for ; Mon, 12 Oct 2020 22:28:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BAF02078E for ; Mon, 12 Oct 2020 22:28:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388860AbgJLW2m (ORCPT ); Mon, 12 Oct 2020 18:28:42 -0400 Received: from www62.your-server.de ([213.133.104.62]:50556 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388361AbgJLW2l (ORCPT ); Mon, 12 Oct 2020 18:28:41 -0400 Received: from sslproxy02.your-server.de ([78.47.166.47]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1kS6J2-0005dl-Ec; Tue, 13 Oct 2020 00:28:36 +0200 Received: from [2a02:1205:5048:a230:688e:a88c:2b15:ece2] (helo=pc-95.home) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kS6J2-000S4U-6d; Tue, 13 Oct 2020 00:28:36 +0200 Subject: Re: [PATCH bpf-next] xsk: introduce padding between ring pointers To: Magnus Karlsson Cc: "Karlsson, Magnus" , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Alexei Starovoitov , Network Development , Jonathan Lemon , bpf , John Fastabend References: <1602166338-21378-1-git-send-email-magnus.karlsson@gmail.com> <43b0605d-f0c9-b81c-4d16-344a7832e083@iogearbox.net> From: Daniel Borkmann Message-ID: <169cf549-1adc-0b75-4fc1-52d2a110a6a7@iogearbox.net> Date: Tue, 13 Oct 2020 00:28:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.4/25955/Mon Oct 12 15:49:06 2020) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 10/12/20 1:13 PM, Magnus Karlsson wrote: [...] > Nope, that was a bad idea. After measuring, this one produces worse > performance than the original suggestion with padding in between all > members. Cannot explain why at the moment, but the numbers are > convincing and above noise level for sure. So let us keep this one: > > u32 producer ____cacheline_aligned_in_smp; > ____cacheline_padding_in_smp; > u32 consumer ____cacheline_aligned_in_smp; > ____cacheline_padding_in_smp; > u32 flags ____cacheline_aligned_in_smp; > ____cacheline_padding_in_smp; > >>> Do you want to submit a patch, or shall I do it? I like your >>> ____cacheline_padding_in_smp better than my explicit "padN" member. Ok, feel free to go for it. Thanks, Daniel