]> git.ipfire.org Git - thirdparty/zstd.git/commit
Use a single buffer in zstdmt
authorNick Terrell <terrelln@fb.com>
Wed, 28 Feb 2018 04:09:18 +0000 (20:09 -0800)
committerNick Terrell <terrelln@fb.com>
Thu, 15 Mar 2018 23:21:33 +0000 (16:21 -0700)
commitf15a17e19ff517d77ee279635b6615eb7c8cf125
tree1dec07e8557d1316df94444be19df90dbe43883c
parenta271399c978a2224976b5a00e83ea22d812efc15
Use a single buffer in zstdmt

Summary:
Allocate a single input buffer large enough to house each job, as well as
enough space for the IO thread to write 2 extra buffers. One goes in the
`POOL` queue, and one to fill, and then block on a full `POOL` queue.
Since we can't overlap with the prefix, we allocate space for 3 extra
input buffers.

Test Plan:
* CI
* With and without ASAN/UBSAN run zstdmt with different number of threads
  on two large binaries, and verify that their checksums match.
* Test on the tip of the zstdmt ldm integration.

Reviewers: cyan

Differential Revision: https://phabricator.intern.facebook.com/D7284007

Tasks: T25664120
lib/compress/zstdmt_compress.c
tests/playTests.sh