Bug 626018

Summary: Allow using crc32c hardware accelerated engine on Intel Nehalem processor
Product: Red Hat Enterprise Linux 5 Reporter: Shuichi Ihara <sihara>
Component: kernelAssignee: Prarit Bhargava <prarit>
Status: CLOSED ERRATA QA Contact: chen yuwen <yuchen>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: ebachalo, jane.lv, jvillalo, jwilson, keve.a.gabbert, luyu, prarit, qcai
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 21:12:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 534185    
Attachments:
Description Flags
A patch for enabling crc32c h/w accelerator
none
RHEL5 fix for this issue
none
correctly introduce crypto::intel-crc32 module none

Description Shuichi Ihara 2010-08-21 14:03:44 UTC
Created attachment 440116 [details]
A patch for enabling crc32c h/w accelerator

Intel Nehalem processor supports hardware accelerated crc32 algorithm with the new CRC32 instruction in SSE 4.2 instruction set. In order to use this feature, the patches were posted to LKML 2 years ago. http://lkml.org/lkml/2008/7/7/58

This kind of patches have not been landed in any in RHEL5.x kernels. I've done porting above codes to RHEL5.5's kernel (linux-2.6.18-194.3.1) and tested them on for the lustre filesytem.  (http://www.lustre.org) (The lustre does checksum between servers and clients for data integrity.)

As far as I'm testing them on the lustre, we did 2x - 7x speedup by using this patches, I believe this helps for any other kind of crc32c calculations.

This patches can enable crc32c h/w acceleration if the processor has SSE 4.2 instruction set, otherwise use normal crc32c.

I really hope this patches will be landed in current RHEL5.x release.

Comment 1 Jane Lv 2010-08-23 02:10:24 UTC
Ron,

Here is a customer request to use Intel CRC32 instruction to implement hardware accelerated CRC32c algorithm in RHEL 5.x.

Would Red Hat consider to include it in RHEL 5.6?  Though I know it's a bit late for RHEL 5.6 inclusion.

Thanks.

Comment 7 Prarit Bhargava 2010-08-30 12:40:56 UTC
(In reply to comment #1)
> Ron,
> 
> Here is a customer request to use Intel CRC32 instruction to implement hardware
> accelerated CRC32c algorithm in RHEL 5.x.
> 
> Would Red Hat consider to include it in RHEL 5.6?  Though I know it's a bit
> late for RHEL 5.6 inclusion.
> 

Jane, I'm going to update the patch and submit this for inclusion in RHEL5.6.  The large performance increase makes it worthwhile.

P.

Comment 8 RHEL Program Management 2010-08-30 12:49:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 9 Prarit Bhargava 2010-08-30 18:50:18 UTC
Created attachment 442007 [details]
RHEL5 fix for this issue

Comment 10 Jane Lv 2010-08-31 05:39:30 UTC
(In reply to comment #9)
> Created attachment 442007 [details]
> RHEL5 fix for this issue

Thanks a lot, Prarit!


-Jane

Comment 12 Jarod Wilson 2010-09-15 14:01:35 UTC
in kernel-2.6.18-221.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 14 Jane Lv 2010-09-19 02:08:38 UTC
Ihara,

Could you please verify the kernel-2.6.18-221.el5 from http://people.redhat.com/jwilson/el5 works for you?

Thanks.

Comment 15 Shuichi Ihara 2010-09-20 16:22:52 UTC
(In reply to comment #14)
> Ihara,
> 
> Could you please verify the kernel-2.6.18-221.el5 from
> http://people.redhat.com/jwilson/el5 works for you?
> 
> Thanks.

it worked well, thanks. we are also implementing h/w acceleration patch into the lustre itself, instead of kernel patches. patches are not landed in any lustre releases and it works for the lustre. So, this kernel patches on here helps for not only the lustre, but all crc32c calculation for all application.

Comment 16 Shuichi Ihara 2010-11-30 01:18:08 UTC
hi, 
is this patch safe on the guest OS with KVM too?
shouldn't we need some additional checking to make sure crc32c is available or not?

Thanks

Comment 17 Alexey Lyashkov 2010-12-10 15:17:16 UTC
Created attachment 467987 [details]
correctly introduce crypto::intel-crc32 module

That patch introduce intel-crc32 module to use via Crypto API.

Comment 18 chen yuwen 2010-12-31 05:38:26 UTC
Confirmed patch in kernel 2.6.18-221.el5.
Setting SanityOnly.

Comment 20 errata-xmlrpc 2011-01-13 21:12:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html