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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF786EB64D9 for ; Tue, 27 Jun 2023 23:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbjF0XFg (ORCPT ); Tue, 27 Jun 2023 19:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229645AbjF0XFe (ORCPT ); Tue, 27 Jun 2023 19:05:34 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB445296D for ; Tue, 27 Jun 2023 16:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687907133; x=1719443133; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=FK+q1lr+AwoT9eN4z1p01SBRj2tgSZa1Ch82VpM14l0=; b=JRxDGQ8Xi5gpW0KQ+SAY/qOG5F69X/VJN+/LippAfN3DFa23AlEFWiqn /FONiifa5CYEPYSD+UX6qirfOb1Y9VsucOfUCgqyU40dAyUF/ZbwosgfM pLshPm07tfVR7q7OR7eMhPJl7csjfxN4OqSBd3uKwJHfHcn3bS9fWOkkr XR3Sb/DcS9cZ58QcCoDToXKdeauflRWecXyKR2uZJAW5Z3QFceyJRzydX kQPxCSAZWHpE3iXL1NA2yq0MgOjghEjKXRTPFhbZVNtImSZY/mDpxjIJd 6MmMsVC6we0s53iOkSe7JM29ejbGlZgdMEQetWAhygHjW930nZx35rGgb Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="341286883" X-IronPort-AV: E=Sophos;i="6.01,163,1684825200"; d="scan'208";a="341286883" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2023 16:05:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="782044687" X-IronPort-AV: E=Sophos;i="6.01,163,1684825200"; d="scan'208";a="782044687" Received: from avandeve-mobl1.amr.corp.intel.com (HELO [10.209.78.231]) ([10.209.78.231]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2023 16:05:32 -0700 Message-ID: Date: Tue, 27 Jun 2023 16:05:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [GIT PULL] x86/misc for 6.5 Content-Language: en-US To: Linus Torvalds Cc: Borislav Petkov , Noah Goldstein , Dave Hansen , x86-ml , lkml References: <20230627110038.GCZJrBVqu/4BfdyBeN@fat_crate.local> <1982e4b4-3858-d456-6c90-92782b95726a@linux.intel.com> <51f58d51-d5bf-79a2-a32a-e6849a118123@linux.intel.com> From: Arjan van de Ven In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/27/2023 4:02 PM, Linus Torvalds wrote: > On Tue, 27 Jun 2023 at 15:51, Arjan van de Ven wrote: >> >> I'm not surprised though; running 2 parallel streams (where one stream has a fixed zero as input, >> so can run OOO any time) .. can really have a performance change like this > > How much do people care? > > One of the advantages of just having that single "update_csum_40b()" > function is that it's trivial to then manually unroll. > > With a 4-way unrolling, I get > > 02: 184.0 / 184.5 cycles (8b414316) Upcoming linux kernel version > 04: 184.0 / 184.2 cycles (8b414316) Specialized to size 40 > 06: 89.4 / 102.5 cycles (512daed6) New version > 22: 184.6 / 184.4 cycles (8b414316) Odd-alignment handling removed > > but doesn't most network hardware do the csum on its own anyway? How > critical is csum_partial(), really? the hardware does most cases.. in https://lore.kernel.org/netdev/20211111181025.2139131-1-eric.dumazet@gmail.com/ Eric kind of implies it's for IPv6 headers in practice