-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Enable QAT support in zfs-dkms RPM #6932
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error: missing "Signed-off-by"
Please, add Signed-off-by
line to commit message.
Otherwise LGTM.
Enable QAT accelerated gzip compression in zfs-dkms RPM package when environment variant ICP_ROOT is set to QAT drive source code folder and QAT hardware presence. Otherwise, switch back to default gzip compression. Signed-off-by: David Qian <[email protected]>
@@ -30,6 +30,7 @@ PRE_BUILD="configure | |||
--with-spl=\${source_tree}/spl-\${PACKAGE_VERSION} | |||
--with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch} | |||
--with-spl-timeout=300 | |||
--with-qat=\${ICP_ROOT} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daweiq is the QAT driver packaged using dkms? If so it would make sense to first check for an installed dkms version and if detected provide that to --with-qat
and --with-qat-obj
. Then additionally provide a way with an environment variable (or two) to specify a location. Please do this in a way such that -with-qat
isn't passed unconditionally to configure when it's not available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@behlendorf QAT driver only provides source code tar ball now. So, we cannot detect the QAT driver source code unless user specific it. After passing this environment variable to configure, the source file check inside configure file will validate the path and decide whether to include QAT or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, then please just update the PR so the --with-qat
is only provided to configure
when ICP_ROOT
is defined. You can use a modified versions of how --enable-debug
is provided and check if the environment variable has a non-zero length.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, patch updated.
Enable QAT accelerated gzip compression in zfs-dkms RPM package when environment variant ICP_ROOT is set to QAT drive source code folder and QAT hardware presence. Otherwise, switch back to default gzip compression. Signed-off-by: David Qian <[email protected]>
See the following comparing error when fetch the latest code from upstrea/master even after I revert all my patch. So, just keep my provide repo unchanged:In file included from ../../module/zcommon/zfs_fletcher_avx512.c:29:0: |
Codecov Report
@@ Coverage Diff @@
## master #6932 +/- ##
==========================================
- Coverage 75.34% 75.32% -0.03%
==========================================
Files 296 296
Lines 95457 95457
==========================================
- Hits 71922 71900 -22
- Misses 23535 23557 +22
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #6932 +/- ##
==========================================
+ Coverage 75.34% 75.34% +<.01%
==========================================
Files 296 296
Lines 95457 95457
==========================================
+ Hits 71922 71925 +3
+ Misses 23535 23532 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit, then LGTM.
scripts/dkms.mkconf
Outdated
@@ -31,6 +31,12 @@ PRE_BUILD="configure | |||
--with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch} | |||
--with-spl-timeout=300 | |||
--with-qat=\${ICP_ROOT} | |||
\$( | |||
[[ -n \${ICP_ROOT} ]] && \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since ICP_ROOT
may not be defined it should be quoted to avoid an error.
@daweiq yup, sorry about the unrelated build issue. Will fix. |
Enable QAT accelerated gzip compression in zfs-dkms RPM package when environment variant ICP_ROOT is set to QAT drive source code folder and QAT hardware presence. Otherwise, use default gzip compression. Reviewed-by: George Melikov <[email protected]> Reviewed-by: David Qian <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #6932
Enable QAT accelerated gzip compression in zfs-dkms RPM package when environment variant ICP_ROOT is set to QAT drive source code folder and QAT hardware presence. Otherwise, use default gzip compression. Reviewed-by: George Melikov <[email protected]> Reviewed-by: David Qian <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#6932
Enable QAT accelerated gzip compression in zfs-dkms RPM package when environment variant ICP_ROOT is set to QAT drive source code folder and QAT hardware presence. Otherwise, use default gzip compression. Reviewed-by: George Melikov <[email protected]> Reviewed-by: David Qian <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#6932
Description
Enable QAT accelerated gzip compression in zfs-dkms RPM package when
environment variant ICP_ROOT is set to QAT drive source code
folder and QAT hardware presence.
Otherwise, switch back to default gzip compression.
Motivation and Context
QAT accelerated gzip compression is only supported when user specific the QAT driver source code path in building zfs from source code.
By adding this new patch, ZFS user can enable QAT support by set ICP_ROOT to local QAT driver source code path before installing the ZFS-DKMS RPM package.
How Has This Been Tested?
Tested the ZFS-DKMS package on CentOS7 with/without ICP_ROOT is set.
Tested the ZFS-DKMS package on CentOS7 with/without QAT driver.
Tested the ZFS-kmod package on CentOS7 without QAT driver.
Types of changes
Checklist:
Signed-off-by
.