lkml.org 
[lkml]   [2014]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] crypto: crc32c-pclmul - Shrink K_table to 32-bit words
From
Date
On Wed, 2014-05-28 at 18:15 -0400, George Spelvin wrote:
> crypto: crc32c-pclmul - Shrink K_table to 32-bit words
>
> There's no need for the K_table to be made of 64-bit words. For some
> reason, the original authors didn't fully reduce the values modulo the
> CRC32C polynomial, and so had some 33-bit number in there. They
> can all be reduced to 32 bits.
>
> Doing that cuts the table size in half. Since the code depends on both
> pclmulq and crc32, SSE 4.1 is obviously present, so we can use pmovzxdq
> to fetch it in the correct format.
>
> Two other related fixes:
> * K_table is read-only, so belongs in .text, not .data, and
> * There's no need for more than 8-byte alignment

George,

Can you do a tcrypt speed measurement with and without your changes?
Check to see if there's any slowdown. Please make sure you pin
the frequency of your cpu when running the test.

e.g.
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Thanks.

Tim




\
 
 \ /
  Last update: 2014-05-29 01:21    [W:0.119 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site