Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp348366imm; Fri, 10 Aug 2018 12:24:17 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwwBNX+ydLRM1i+8JbAhYgSgRap3H7i35qYYNcK2JoMSvAEfJKiBaIjsa9sOUMLcruYVlHi X-Received: by 2002:a63:571d:: with SMTP id l29-v6mr7369683pgb.296.1533929057500; Fri, 10 Aug 2018 12:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533929057; cv=none; d=google.com; s=arc-20160816; b=I+Dk2AuNsr2VjxRPNPFABLSIO6WcN5mwURCUw925Rwl6vPsnXHEeQw/Wp4Oe+pLfQs 3WbKctsZm62wpiP3MzQ9tdqEEEt+xf2goiK5aeZVzUW9/BwFZwNyt2dx5gDFZ/SjN44C XBvfeeRlWJxfP8RyKI5uLJnoSBWhN9vY0yAOD29L+pCZCVkPkPJmJi1mNRr0M9Ltx9pB hXJkOvYQ3Zq5F46dueTycvBZq6FzUHgPEVysqklnV2kf83L+xEfQfe/bcbQosGmk9EMg ChLBHpprt9Cj+qYiDoFaFVqo+h1VqzOG5yUzciSG1CBTFKbSRgbgHyRjQBvXTI/CD5Np k1zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=w/riu1LOwVhi5nn8XI5PbrtFzWe4vLype2pnlEJK5tI=; b=lZcnvBo8PBNRUHavnjW/pyyimHgODuLsSzZj0VfKI7+hCAxKi5znJS9U51nztDMVGo CaBfpNDPqIWeqZ4w2bhW48fQ2MfflJE370SZGGOa5v+bXmqxGFhGoNreKy3EQsFsms1n quQx6xoF07+1N9E+r49OOkkoLX4OS95nMN+tbubloPjCvHp6YNe3fq54GZ8O+VptTq5/ GW6YBLLqEFcc1uVhp/AE9H3HeCwQBvYoZ9gBZV2vH05soaD9lGOtW6cUIe76h+s64f7Q RB8lkR04g1SLgzvsNIpW9eu4aZxXWyCV2RGyahtH5objDCB5dwekYoPzvt07VO1JbV/p 1/Sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si9305161plc.205.2018.08.10.12.24.01; Fri, 10 Aug 2018 12:24:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727206AbeHJVyW (ORCPT + 99 others); Fri, 10 Aug 2018 17:54:22 -0400 Received: from smtprelay0112.hostedemail.com ([216.40.44.112]:33102 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726666AbeHJVyV (ORCPT ); Fri, 10 Aug 2018 17:54:21 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 661A3180A8459; Fri, 10 Aug 2018 19:23:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:4250:4321:4362:5007:6119:8603:10004:10400:10848:11026:11232:11658:11914:12048:12050:12740:12760:12895:13069:13138:13146:13230:13231:13311:13357:13439:14659:21080:21433:21627:21740:30054:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:31,LUA_SUMMARY:none X-HE-Tag: hands99_8fb7cafcbc351 X-Filterd-Recvd-Size: 2126 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA; Fri, 10 Aug 2018 19:23:07 +0000 (UTC) Message-ID: <9b5b906f42dfab78f382c90f66851717d258a15d.camel@perches.com> Subject: Re: [PATCH] Performance Improvement in CRC16 Calculations. From: Joe Perches To: Jeff Lien , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org Cc: herbert@gondor.apana.org.au, tim.c.chen@linux.intel.com, martin.petersen@oracle.com, david.darrington@wdc.com, jeff.furlong@wdc.com Date: Fri, 10 Aug 2018 12:23:06 -0700 In-Reply-To: <1533928331-21303-1-git-send-email-jeff.lien@wdc.com> References: <1533928331-21303-1-git-send-email-jeff.lien@wdc.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-08-10 at 14:12 -0500, Jeff Lien wrote: > This patch provides a performance improvement for the CRC16 calculations done in read/write > workloads using the T10 Type 1/2/3 guard field. For example, today with sequential write > workloads (one thread/CPU of IO) we consume 100% of the CPU because of the CRC16 computation > bottleneck. Today's block devices are considerably faster, but the CRC16 calculation prevents > folks from utilizing the throughput of such devices. To speed up this calculation and expose > the block device throughput, we slice the old single byte for loop into a 16 byte for loop, > with a larger CRC table to match. The result has shown 5x performance improvements on various > big endian and little endian systems running the 4.18.0 kernel version. Thanks. This seems a sensible tradeoff for the 4k text size increase. > diff --git a/crypto/crct10dif_common.c b/crypto/crct10dif_common.c [] trivia: > +static const __u16 t10_dif_crc_table[16][256] = { > + { > + 0x0000u, 0x8BB7u, 0x9CD9u, 0x176Eu, 0xB205u, 0x39B2u, 0x2EDCu, 0xA56Bu, All the 'u's are unnecessary visual noise.