Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sha256 x86_64 optimization v2/vectorized checksum (01.09.2015) rebased to 09.03.2016 [take1] #4400

Conversation

kernelOfTruth
Copy link
Contributor

#2351 sha256 x86_64 optimization v2 rebased to current master

Not sure of the compilation and parallel build changes were done properly
(47a4a6fd),

but for now this has to suffice - pretty late & time to get some rest,

not compile-tested yet.

Buildbots Go ! ;)

thanks to @tomgarcia

tuxoko and others added 7 commits March 10, 2016 00:26
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Arch specific include is located at include/asm. include/asm is generated
during configure time. It first copy every *.h from include/asm-generic, and
then copy every *.h from include/$TARGET_ASM_DIR over them.

Thus, when introducing new arch specific include file foo.h, you only need to
add a generic version in include/asm-generic. Later on, each architecture can
add its own version of foo.h in its respective directory.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
The asm optimization for sha256 we'll be using transforms multiple blocks in a
single function call. Thus, we refactor the existing generic code in
preparation for the upcoming change.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
The function pointer sha256_transform decides which arch specific optimization
to use. It defaults to sha256_transform_generic().

To override it, you need to:
1. Override funtion prototype for arch_sha256_init in
   include/asm-xxx/sha256.h
2. Implement arch_sha256_init() to assign sha256_transform properly and put it
   in module/zfs/asm-xxxx/

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
The sha256-{ssse3,avx,avx2}-asm.S files are copied from linux-3.14.

Currently, we only support optimization in kernel space. User programs will
use generic code.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Run some simple tests on predefined strings when ZFS_DEBUG is on.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
@kernelOfTruth kernelOfTruth changed the title sha256 x86_64 optimization v2/vectorized checksum (01.09.2015) rebased to 09.03.2016 sha256 x86_64 optimization v2/vectorized checksum (01.09.2015) rebased to 09.03.2016 [take1] Mar 9, 2016
@tuxoko
Copy link
Contributor

tuxoko commented Mar 10, 2016

@kernelOfTruth
I updated the sha256 stuff to make it work with new kernel.
And you should no longer need to fix build error.

@kernelOfTruth
Copy link
Contributor Author

@tuxoko thank you very much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants