Page MenuHomeFreeBSD

Change the loop unroll settings for skein
ClosedPublic

Authored by allanjude on Sep 8 2016, 3:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 8:38 PM
Unknown Object (File)
Mon, Apr 8, 8:38 PM
Unknown Object (File)
Mar 22 2024, 10:16 PM
Unknown Object (File)
Mar 22 2024, 10:16 PM
Unknown Object (File)
Mar 22 2024, 10:16 PM
Unknown Object (File)
Mar 22 2024, 10:16 PM
Unknown Object (File)
Mar 19 2024, 2:35 AM
Unknown Object (File)
Mar 18 2024, 5:45 PM
Subscribers

Details

Summary

Changes the c version from the default of 001 to 995
This unroles the loop the maximum number of times for skein256 and 512, and half the maximum for 1024

It does not appear possible to unroll 1024 the maximum number of times (10) because the SKEIN_LOOP setting is read % 10

A setting of 0 is supposed to unroll the maximum number of times, but it uses different code and ends up being slower:
SKEIN_LOOP=0 skein512: 208 MiB/second
SKEIN_LOOP=995 skein512: 508 MiB/second

For the assembly version, the setting changes from the default of 002 to 0
This fully unrolls the skein1024 loop resulting in a performance increase:

SKEIN_LOOP=002 skein1024: 469 MiB/second
SKEIN_LOOP=0 skein1024: 530 MiB/second

Code sizes:
-rwxr-xr-x 1 allan wheel 114640 Sep 7 20:54 /tmp/libmd_asm_000.so*
-rwxr-xr-x 1 allan wheel 105856 Sep 7 20:55 /tmp/libmd_asm_001.so*
-rwxr-xr-x 1 allan wheel 106272 Sep 7 20:55 /tmp/libmd_asm_002.so*
-rwxr-xr-x 1 allan wheel 109952 Sep 7 20:56 /tmp/libmd_asm_005.so*
-rwxr-xr-x 1 allan wheel 99696 Sep 7 21:01 /tmp/libmd_asm_111.so*
-rwxr-xr-x 1 allan wheel 102672 Sep 7 21:09 /tmp/libmd_asm_332.so*
-rwxr-xr-x 1 allan wheel 111600 Sep 7 21:10 /tmp/libmd_asm_995.so*
-rwxr-xr-x 1 allan wheel 156064 Sep 7 21:47 /tmp/libmd_c_000.so*
-rwxr-xr-x 1 allan wheel 101616 Sep 7 21:29 /tmp/libmd_c_111.so*
-rwxr-xr-x 1 allan wheel 103232 Sep 7 21:54 /tmp/libmd_c_112.so*
-rwxr-xr-x 1 allan wheel 107584 Sep 7 21:27 /tmp/libmd_c_332.so*
-rwxr-xr-x 1 allan wheel 113904 Sep 7 21:13 /tmp/libmd_c_995.so*

Test Plan

Todo: test on i386

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

allanjude retitled this revision from to Change the loop unroll settings for skein.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added reviewers: sbruno, emaste.

Allan:

Was I going to test this for you or are you able to test it?

Allan:

Was I going to test this for you or are you able to test it?

The userland side of this has been tested on amd64, although it would be good to validate the results on i386 and armv6/arm64

sbruno edited edge metadata.

This is acceptable for i386 when using my build of boot1.efifat.

This revision is now accepted and ready to land.Sep 13 2016, 6:26 PM
allanjude edited edge metadata.

Rebase to -current

This revision now requires review to proceed.Jul 1 2017, 9:01 PM
This revision was automatically updated to reflect the committed changes.