Repository navigation
Conversation
Signed-off-by: williswus <willis060510@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Missing software-backend and binary-trace checksum regression coverage leaves legacy CRC32C format and seed compatibility insufficiently verified.
2 open issues
What changed in this PR
Consolidates ZFile and persisted prefetch trace checksums on the existing Photon dependency, removing duplicated CRC32C code and optional Intel backends.
Changes:
- Migrates checksum calls to Photon, with CPU-aware hardware/software selection for ZFile.
- Removes the local CRC32C implementation and DML/ISA-L integration.
- Adds legacy checksum vectors and updates build workflows, dependency tracking, and documentation.
| File | Description |
|---|---|
src/prefetch.cpp |
Uses Photon for chained trace checksums. |
src/overlaybd/zfile/zfile.cpp |
Adds guarded backend selection and migrates checksum calls. |
src/overlaybd/zfile/thirdparty/CMakeLists.txt |
Removes Intel backend build steps. |
src/overlaybd/zfile/test/test.cpp |
Adds legacy checksum vectors and updates checksum helpers. |
src/overlaybd/zfile/README.md |
Documents Photon checksum backend selection. |
src/overlaybd/zfile/crc32/crc32c.h |
Removes the local checksum API. |
src/overlaybd/zfile/crc32/crc32c.cpp |
Removes local checksum implementations and Intel acceleration. |
src/overlaybd/zfile/CMakeLists.txt |
Removes the CRC library target and links ZFile to Photon. |
README.md |
Removes obsolete Intel options and submodule setup instructions. |
README_zh.md |
Updates Chinese build instructions to match dependency removal. |
.gitmodules |
Removes DML and ISA-L submodule declarations. |
.github/workflows/tcmu-performance.yml |
Simplifies current builds while retaining baseline backend settings. |
.github/workflows/release/build.sh |
Removes unused Ubuntu packages and retired build flags. |
.github/workflows/release.yml |
Stops checking out submodules. |
.github/workflows/cmake.yml |
Removes Intel packages, flags, and submodule initialization. |
.github/dependabot.yml |
Removes submodule dependency updates. |
Review effort: Max
Comment on lines
+288
to
293
| TEST_F(ZFileTest, legacy_crc32c) { | ||
| // Legacy metadata and data-block checksums for the same 512 bytes. | ||
| const char data[512] = "123456789"; | ||
| EXPECT_EQ(0x3aed893fU, zfile_crc32c(data, sizeof(data))); | ||
| EXPECT_EQ(0x1de869e4U, crc32c_salt(data, sizeof(data))); | ||
| } |
|
|
||
| for (auto &each : m_record_array) { | ||
| hdr.checksum = crc32::crc32c_extend(&each, sizeof(TraceFormat), hdr.checksum); | ||
| hdr.checksum = crc32c_extend(&each, sizeof(TraceFormat), hdr.checksum); |
lihuiba
reviewed
Nov 23, 2026
| // needs carry-less multiplication. Select the Photon backend once. | ||
| static const auto compute = [] { | ||
| #if defined(__x86_64__) | ||
| if (!__builtin_cpu_supports("pclmul")) |
Contributor
There was a problem hiding this comment.
photon already checks for pclmul. Why check it again here?
Contributor
|
is there any performance degradation after switching implementation? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Use Photon CRC32C for ZFile and prefetch traces. Remove the local CRC32C implementation and the Intel DML and ISA-L dependencies.
Testing: 14 ZFile tests and 2 prefetch trace tests passed. Nine fixtures produced byte-identical files with the old and new implementations.