Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3036224pxu; Mon, 14 Dec 2020 18:45:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIJrkSuWwBP/+QGeVQ3UKB07SRLV02tGKkR/a+tD6hVVI/wAqVTm8JkmRuA3WujL/0yBBt X-Received: by 2002:a17:906:b793:: with SMTP id dt19mr24985970ejb.120.1608000304281; Mon, 14 Dec 2020 18:45:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608000304; cv=none; d=google.com; s=arc-20160816; b=y8zdRiW68tJPA7zfRl0QIAaV3ULGsHCYm0Vs33inQB1R2d0YPSjvGzMLWF1jtmhp6V u+ZmvRMQG4+eqC3KO5TZRbKp49L/tIE7/XHa179AmxpaaR61s2XOt8zZzZHjFWl0i41G z8O/mRaHqy0njZxc0RZYya//C+0gDNXVidcE+6oLnMF67lfIo57o+hBSz7uzbuefXqJp +xRNeF29dmwWzAfJxV3HDCRVs4lm59GUQE45BdcH1iL00BPvjKAkm9PeM2i4dbbDRtiy U819IiKVgSN9GQYDkwCLdzspM/0VaruhGcYR94m7U1OMNOYtPcWnowI9VbNfHIB9tJDn 9yvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ofyvdFqpv4pRBgHjWrZXMxEqm3YWLkaoXdXR7HfLB+I=; b=FPMB7YCt9pSibIWWlD3y4eXZi7/Ekpqn9zOSGlZ6Os3Lfmee5AGW8aFja+3MLINCGX 1tDh+RHR1oQsPceqhuCPCf347F543DrhNhvr5MvbGIiBPQPMDeh2W05uuHhVRDkyGVQ2 YjjhFGNzJyk3UYudmsZDioJu7uDrxpjgfT+B6m/33NhcJ03sh4euYDnU1rSOqFBUAqjp lxrkVjzVpsb96Bk26ITk0BGGGRiTgh+z3AQIE1EjcM9HpOfOVkYNM4rwObHQcR0zl5re w/fEgNt54AbXSOiKTcjV2KcZ6Ckmq17/ORSyaVoqBrHFXN4jogK0oEcOa2s2T+w/sRUI r4pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si190321edx.584.2020.12.14.18.44.26; Mon, 14 Dec 2020 18:45:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbgLOCQh (ORCPT + 99 others); Mon, 14 Dec 2020 21:16:37 -0500 Received: from ZXSHCAS1.zhaoxin.com ([203.148.12.81]:46345 "EHLO ZXSHCAS1.zhaoxin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbgLOCQb (ORCPT ); Mon, 14 Dec 2020 21:16:31 -0500 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 15 Dec 2020 10:15:42 +0800 Received: from [10.32.56.37] (10.32.56.37) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 15 Dec 2020 10:15:39 +0800 Subject: Re: [PATCH] crypto: x86/crc32c-intel - Don't match some Zhaoxin CPUs To: Eric Biggers CC: , , , , , , , , , , , , , , References: <1607686144-2604-1-git-send-email-TonyWWang-oc@zhaoxin.com> <1f8d17bf-c1d9-6496-d2f8-5773633011fb@zhaoxin.com> From: Tony W Wang-oc Message-ID: Date: Tue, 15 Dec 2020 10:15:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.32.56.37] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 15/12/2020 04:41, Eric Biggers wrote: > On Mon, Dec 14, 2020 at 10:28:19AM +0800, Tony W Wang-oc wrote: >> On 12/12/2020 01:43, Eric Biggers wrote: >>> On Fri, Dec 11, 2020 at 07:29:04PM +0800, Tony W Wang-oc wrote: >>>> The driver crc32c-intel match CPUs supporting X86_FEATURE_XMM4_2. >>>> On platforms with Zhaoxin CPUs supporting this X86 feature, When >>>> crc32c-intel and crc32c-generic are both registered, system will >>>> use crc32c-intel because its .cra_priority is greater than >>>> crc32c-generic. This case expect to use crc32c-generic driver for >>>> some Zhaoxin CPUs to get performance gain, So remove these Zhaoxin >>>> CPUs support from crc32c-intel. >>>> >>>> Signed-off-by: Tony W Wang-oc >>> >>> Does this mean that the performance of the crc32c instruction on those CPUs is >>> actually slower than a regular C implementation? That's very weird. >>> >> >> From the lmbench3 Create and Delete file test on those chips, I think yes. >> > > Did you try measuring the performance of the hashing itself, and not some > higher-level filesystem operations? > Yes. Was testing on these Zhaoxin CPUs, the result is that with the same input value the generic C implementation takes fewer time than the crc32c instruction implementation. Sincerely Tony