[ 
https://issues.apache.org/jira/browse/HADOOP-11660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365399#comment-14365399
 ] 

Edward Nevill commented on HADOOP-11660:
----------------------------------------

Hi Colin,

My understanding was that the issue was the no of #ifdefs in the file so I 
reworked it to reduce it to a single #ifdef X86 ... #elif AARCH64 #endif.

I have prepared a new patch which separates x86 and aarch64 into two files 
bulk_crc32_x86.c and bulk_crc32_aarch64.c. bulk_crc32.c now contains just the 
fallback software implementation.

The cmakefile includes both bulk_crc32_x86.c and bulk_crc32_aarch64.c and the 
two files are then protected by

bulk_crc32_x86.c

{code}
#ifdef <X86>
....
#endif
{code}

bulk_crc32_aarch64.c

{code}
#ifdef <AARCH64>
...
#endif
{code}

I am not clear how to make cmake select correctly the _x86 or _aarch64 version. 
If you could help me with this then we can get rid of the final 
conditionalisation above.

I have also added back in support for the optimised 32 bit x86 implemetation.

All the best,
Ed.


> Add support for hardware crc on ARM aarch64 architecture
> --------------------------------------------------------
>
>                 Key: HADOOP-11660
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11660
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: native
>    Affects Versions: 3.0.0
>         Environment: ARM aarch64 development platform
>            Reporter: Edward Nevill
>            Assignee: Edward Nevill
>            Priority: Minor
>              Labels: performance
>         Attachments: jira-11660.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> This patch adds support for hardware crc for ARM's new 64 bit architecture
> The patch is completely conditionalized on __aarch64__
> I have only added support for the non pipelined version as I benchmarked the 
> pipelined version on aarch64 and it showed no performance improvement.
> The aarch64 version supports both Castagnoli and Zlib CRCs as both of these 
> are supported on ARM aarch64 hardwre.
> To benchmark this I modified the test_bulk_crc32 test to print out the time 
> taken to CRC a 1MB dataset 1000 times.
> Before:
> CRC 1048576 bytes @ 512 bytes per checksum X 1000 iterations = 2.55
> CRC 1048576 bytes @ 512 bytes per checksum X 1000 iterations = 2.55
> After:
> CRC 1048576 bytes @ 512 bytes per checksum X 1000 iterations = 0.57
> CRC 1048576 bytes @ 512 bytes per checksum X 1000 iterations = 0.57
> So this represents a 5X performance improvement on raw CRC calculation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to