Commit Graph

247 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov e08e902303 Add RPM spec 2020-12-01 02:08:51 +03:00
Shengjing Zhu c9d104050f use gbp to generate changelog
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 22:16:00 +08:00
Shengjing Zhu fe118d1c13 drop unnecessary dh-argument --parallel
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 22:16:00 +08:00
Shengjing Zhu ceddad220a drop unnecessary autoconf Build-Depends
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 22:16:00 +08:00
Shengjing Zhu ef3aefcfa5 update libgf-complete1.symbols after enable sse3/sse4
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 22:16:00 +08:00
Shengjing Zhu 6796212032 change Maintainer to Debian OpenStack team, and add myself to Uploaders
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 22:16:00 +08:00
Shengjing Zhu 45d3d30d11 update Standards-Version to 4.1.4(no changes)
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 21:23:52 +08:00
Shengjing Zhu 663185eb5b update compat and debhelper to 10
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 21:23:52 +08:00
Shengjing Zhu 3ca8fb3ce5 use qemu-user-static to test program without SIMD
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 21:23:52 +08:00
Shengjing Zhu 74b1255165 remove patch: 0001-temporarily-disable-sse3-and-above.patch
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-05-22 18:53:30 +08:00
Shengjing Zhu ede83b8ddd fix symbols file based on last patch
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-04-03 21:31:53 +08:00
Shengjing Zhu e4f48e9d2e update changelog again for last patch
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-04-03 21:13:11 +08:00
Shengjing Zhu ee94ff8a74 Add d/patches/0001-temporarily-disable-sse3-and-above.patch
Disable SSE3+ on amd64 (Closes: #894670).

Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-04-03 21:13:11 +08:00
Shengjing Zhu c7f00c1b31 release to unstable
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-04-03 13:44:47 +08:00
Shengjing Zhu 4eb8a52881 d/rules: disable SIMD on 32bit(sse on i386, neon on armel/armhf)
it failed to build and buggy in runtime detection.

Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-04-03 13:25:43 +08:00
Shengjing Zhu aa06b3a97b d/rules: use default.mk instead of manually parse changelog
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-04-03 11:42:28 +08:00
Shengjing Zhu b1db207734 d/libgf_complete1.symbols: fix arch dependent symbols
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-04-03 10:43:28 +08:00
Shengjing Zhu 7894ebec1f release to debian unstable
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 16:35:17 +00:00
Shengjing Zhu 30f963c883 move Vcs-Git/Vcs-Browser to salsa.d.o
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 15:47:55 +00:00
Shengjing Zhu 8f1bf0fdf5 update gbp.conf
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 15:15:07 +00:00
Shengjing Zhu 7ae1712e3e run wrap-and-sort -bast
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 15:12:11 +00:00
Shengjing Zhu 8e230a7c85 use https in dep5 copyright format url
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 15:12:11 +00:00
Shengjing Zhu 5e63b3a461 move global-files-wildcard to first paragraph in dep5 copyright
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 18:05:07 +08:00
Shengjing Zhu caef1e090f update Standards-Version to 4.1.3, changing Priority to optional
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 17:52:31 +08:00
Shengjing Zhu a6693d747f update libgf_complete1.symbols
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 17:22:14 +08:00
Shengjing Zhu a7c73ad9dd drop not use sse patch, gf-complete supports runtime simd detection
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 16:51:47 +08:00
Shengjing Zhu 4ee6b31d55 update gf-complete's upstream git repo
Signed-off-by: Shengjing Zhu <i@zhsj.me>
2018-03-29 16:47:09 +08:00
Shengjing Zhu 6f7baa73cb Revert "Also build a libgf-complete1-sse package, which contains the optimized version of the library."
This reverts commit 30528bf580.

 Conflicts:
	debian/changelog
 resolved by merging changelog
2018-03-29 16:42:59 +08:00
Shengjing Zhu d8ff0de6a9 Merge tag '1.0.2+2017.04.10.git.ea75cdf' into debian/unstable
tag 1.0.2+2017.04.10.git.ea75cdf from upstream/master
2018-03-29 16:37:12 +08:00
Loic Dachary a6862d10c9 Merge branch 'wip-signed-integer-overflow-cppcheck' into 'master'
Wip signed integer overflow cppcheck

Fix for cppcheck signed integer overflow errors

See merge request !21
2017-04-10 07:51:10 +00:00
Brad Hubbard 2700e1b9ae Resolve cppcheck Signed integer overflow errors
The type of expression '1<<31' is signed int and this causes cppcheck to
issue the following warning.

src/gf_w32.c:681]: (error) Signed integer overflow for expression
'1<<31'.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2017-04-10 17:21:30 +10:00
Loic Dachary ea75cdffe1 Merge branch 'wip-18092' into 'master'
gf_cpu.c: fix pclmul detection and add portable cpuid feature bit defs

See merge request !20
2016-12-08 06:12:42 +00:00
John Coyle 7c2fcc5bd0 gf_cpu.c: fix pclmul detection and add portable cpuid feature bit defs
Correct invalid check for pclmul support. Was checking SSE3 (1 << 0) vs. PCLMUL (1 << 1).

Fixes: http://tracker.ceph.com/issues/18092
Signed-off-by: John Coyle <dx9err@gmail.com>
2016-12-07 21:50:17 -05:00
Loic Dachary c431e1ff76 Merge branch 'gf32-mul-silence-warning' into 'master'
Gf32 mul silence warning

silence warning like

```
/slow/kchai/ceph/src/erasure-code/jerasure/gf-complete/src/gf_w32.c: In function ‘gf_w32_cfmgk_multiply_region_from_single’:
/slow/kchai/ceph/src/erasure-code/jerasure/gf-complete/src/gf_w32.c:410:5: warning: ‘a’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   g = _mm_insert_epi64 (a, g_star, 0);
     ^
```

See merge request !19
2016-11-23 06:51:02 +00:00
Kefu Chai 9fbc442593 gf_w32.c: silence the -Wmaybe-uninitialized warning
in gf_w32_cfmgk_multiply_region_from_single(), follow warning is
reported by gcc:

gf-complete/src/gf_w32.c:410:5: warning: ‘a’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
   g = _mm_insert_epi64 (a, g_star, 0);
     ^

actually, we are using `a` as a dummy parameter for initializing `g` and
`q`. and only the lower lower 64 bits of them are used when doing
calculation. but their lower 64 bits are always initialized using
_mm_insert_epi64(). so this is a false alarm.

but we can silence this warning by moving the statement initializing `a`
up before passing it to  _mm_insert_epi64(). this change does not hurt
the performance.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-11-18 03:53:50 +00:00
bassamtabbara a6847973cb Merge branch 'simd-runtime-detection' into 'master'
Support for runtime detection of SIMD

This merge request adds support for runtime SIMD detection. The idea is that you would build gf-complete with full SIMD support, and gf_init will select the appropriate function at runtime based on the capabilities of the target machine. This would eliminate the need to build different versions of the code for different processors (you still need to build for different archs). Ceph for example has 3-4 flavors of jerasure on Intel (and does not support PCLMUL optimizations as a result of using to many binaries). Numerous libraries have followed as similar approach include zlib.

When reviewing this merge request I recommend that you look at each of the 5 commits independently. The first 3 commits don't change the existing logic. Instead they add debugging functions and test scripts that facilitate testing of the 4th and commit. The 4th commit is where all the new logic goes along with tests. The 5th commit fixes build scripts.

I've tested this on x86_64, arm, and aarch64 using QEMU. Numerous tests have been added that help this code and could help with future testing of gf-complete. Also I've compared the functions selected with the old code (prior to runtime SIMD support) with the new code and all functions are identical. Here's a gist with the test results prior to SIMD extensions: https://gist.github.com/bassamtabbara/d9a6dcf0a749b7ab01bc2953a359edec.

See merge request !18
2016-09-14 20:22:27 +00:00
Bassam Tabbara 0690ba86a8 Added --enable flags for debugging runtime SIMD 2016-09-13 12:25:00 -07:00
Bassam Tabbara 0e5c920fb6 gf_multby_one now checks runtime SIMD support 2016-09-13 12:25:00 -07:00
Bassam Tabbara ad11042132 Simplify SIMD make scripts
ax_ext.m4 no longer performs any CPU checks. Instead it just checks
if the the compile supports SIMD flags.

Runtime detection will choose the right methods base on CPU
instructions available.

Intel AVX support is still done through the build since it would
require a major refactoring of the code base to support it at runtime.
For now I added a configuration flag --enable-avx that can be used
to compile with AVX support.

Also use cpu intrinsics instead of __asm__
2016-09-13 12:25:00 -07:00
Bassam Tabbara 4339569f14 Support for runtime SIMD detection
This commits adds support for runtime detection of SIMD instructions. The idea is that you would build once with all supported SIMD functions and the same binaries could run on different machines with varying support for SIMD. At runtime gf-complete will select the right functions based on the processor.

gf_cpu.c has the logic to detect SIMD instructions. On Intel processors this is done through cpuid. For ARM on linux we use getauxv.

The logic in gf_w*.c has been changed to check for runtime SIMD support and fallback to generic code.

Also a new test has been added. It compares the functions selected by gf_init when we enable/disable SIMD support through build flags, with runtime enabling/disabling. The test checks if the results are identical.
2016-09-13 12:24:25 -07:00
Bassam Tabbara 7761438c63 Add SIMD test helpers
This commit adds a couple of scripts that help test SIMD functionality
on different machines through QEMU.

tools/test_simd_qemu.sh will automatically start qemu, run tests
and stop it. it uses the Ubuntu cloud images which are built for
x86_64, arm and arm64.

tools/test_simd.sh run a number of tests including compiling
with different flags, unit tests, and gathering the functions
selected in gf_init (and when compiling with DEBUG_FUNCTIONS)
2016-09-13 12:24:25 -07:00
Bassam Tabbara 87f0d4395d Add support for printing functions selected in gf_init
There is currently no way to figure out which functions were selected
during gf_init and as a result of SIMD options. This is not even possible
in gdb since most functions are static.

This commit adds a new macro SET_FUNCTION that records the name of the
function selected during init inside the gf_internal structure. This macro
only works when DEBUG_FUNCTIONS is defined during compile. Otherwise the
code works exactly as it did before this change.

The names of selected functions will be used during testing of SIMD
runtime detection.

All calls such as:

gf->multiply.w32 = gf_w16_shift_multiply;

need to be replaced with the following:

SET_FUNCTION(gf,multiply,w32,gf_w16_shift_multiply)

Also added a new flag to tools/gf_methods that will print the names of
functions selected during gf_init.
2016-09-13 12:24:25 -07:00
Bassam Tabbara 22352ca094 Remove generated autotools files from the build. Also update
.gitignore to ignore some autotools files and tests.
2016-09-13 12:24:25 -07:00
Loic Dachary 185295f247 Merge branch 'wip-valgrind' into 'master'
enable valgrind for tests

See merge request !9
2016-09-13 19:23:39 +00:00
Loic Dachary 51a1abb918 Merge branch 'neon_fixes' into 'master'
NEON fixes/tweaks

This merge request fixes some issues and adds some tweaks to NEON code:

* SPLIT(16,4) ALTMAP implementation was broken as it only processed half the amount of data. As such, this fixed implementation is significantly slower than the old code (which is to be expected). Fixes #2
* SPLIT(16,4) implementations now merge the ARMv8 and older code path, similar to SPLIT(32,4). This fixes the ALTMAP variant, and also enables the non-ALTMAP version to have consistent sizing
* Unnecessary VTRN removed in non-ALTMAP SPLIT(16,4) as NEON allows (de)interleaving during load/store; because of this, ALTMAP isn't so useful in NEON
  * This can also be done for SPLIT(32,4), but I have not implemented it
* I also pulled the `if(xor)` conditional from non-ALTMAP SPLIT(16,4) to outside the loop. It seems to improve performance a bit on my Cortex A7
  * It probably should be implemented everywhere else, but I have not done this
* CARRY_FREE was incorrectly enabled on all sizes of w, when it's only available for w=4 and w=8

See merge request !16
2016-09-13 10:34:23 +00:00
Loic Dachary f940bf3b5b log-zero-ext: workaround for uninitialized memory
Workaround until issue #13 is dealt with.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-09-13 11:46:05 +02:00
Loic Dachary e2dd917ea1 increase the verbosity of make check failures
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-09-13 10:25:13 +02:00
Loic Dachary 22cd7b15e8 add --enable-valgrind for make check
If --enable-valgrind is given to ./configure, all tests are run with
valgrind set to fail if an error is reported ( --error-exitcode=1 )

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-09-13 10:09:00 +02:00
Loic Dachary 62b702d568 do not memcpy if src and dst are the same
This is harmless really but triggers a valgrind error.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-09-13 09:48:18 +02:00
Loic Dachary 8fe7382e2a Merge branch 'manual' into 'master'
HTML manual fixes

Fixes to HTML manual, for mistakes I've noticed.
I'm sure there's more, but this is a start...

See merge request !14
2016-09-13 06:59:08 +00:00