PeterPtroc commented on PR #8031:
URL: https://github.com/apache/hadoop/pull/8031#issuecomment-3692613574

   sorry for the late reply.
   I completely agree with the suggested approach: merging the Zbc/Zbkc 
scalar-based CRC32C acceleration first, followed by the vector (V + Zvbc) 
version. This aligns perfectly with my current plan.
   
   I am also excited to collaborate with @leiwen2025 in the next phase to 
integrate the vectorized solution. Our goal is to implement a multi-tiered 
optimization strategy: **`vclmul > clmul > software`**.
   
   The decision to prioritize the scalar (Zbc/Zbkc) implementation is based on 
several key factors:
   
   *   **Broader Hardware Availability**: Zbc is part of the RISC-V scalar 
cryptography extension and is already supported by many mainstream chips (e.g., 
SiFive P/U series, T-Head C9xx). The Vector extension (V) and Zvbc are 
currently limited to newer high-end or experimental hardware, so the scalar 
version provides immediate benefits to a larger user base.
   *   **Ease of Verification and Maintenance**: The scalar implementation is 
logically simpler, making it easier to review, test, and debug. Vectorization 
introduces complexities like memory alignment and register scheduling, which 
are better handled as a dedicated follow-up optimization.
   *   **Progressive Evolution & Robust Fallback**: Establishing a solid scalar 
path first allows us to build a robust fallback mechanism (`vclmul → clmul → 
software`). This ensures that Hadoop can run efficiently across the diverse 
RISC-V hardware ecosystem.
   
   I will update the PR with the requested comments and documentation from 
@steveloughran shortly to ensure the implementation is well-explained for 
future developers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to