Skip to content
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

Code improvement and bug fixes for QAT support #8608

Closed
wants to merge 8 commits into from
Closed

Code improvement and bug fixes for QAT support #8608

wants to merge 8 commits into from

Conversation

cfzhu
Copy link
Contributor

@cfzhu cfzhu commented Apr 11, 2019

Motivation and Context

The current implementation initializes the QAT support for ZFS when the ZFS kernel module is loaded.
A prerequisite for this initialization to succeed is that the Intel QAT driver has already been initialized.
If this is not the case the QAT support for ZFS will not be available even if the QAT driver becomes available at a later stage. #8323

Description

Code improvement and bug fixes for QAT support

  1. Support QAT when ZFS is root file-system:
    When ZFS module is loaded before QAT started, the QAT can
    be started again in post-process, e.g.:
    echo 0 > /sys/module/zfs/parameters/zfs_qat_compress_disable
    echo 0 > /sys/module/zfs/parameters/zfs_qat_encrypt_disable
    echo 0 > /sys/module/zfs/parameters/zfs_qat_checksum_disable
  2. Verify alder checksum of the de-compress result
  3. Allocate Digest, IV and AAD buffer in physical contiguous
    memory by QAT_PHYS_CONTIG_ALLOC.
  4. Support session re-use feature in the new QAT driver, by
    waiting session lock before remove session.

How Has This Been Tested?

Ran local tests when the QAT driver is available at a later time, it can enable QAT
support by command 'echo 0 > /sys/module/zfs/parameters/zfs_qat_*_disable' when the
QAT started.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

cfzhu and others added 8 commits March 15, 2019 15:30
1. Support QAT when ZFS is root file-system:
   When ZFS module is loaded before QAT started, the QAT can
   be started again in post-process, e.g.:
   echo 0 > /sys/module/zfs/parameters/zfs_qat_compress_disable
   echo 0 > /sys/module/zfs/parameters/zfs_qat_encrypt_disable
   echo 0 > /sys/module/zfs/parameters/zfs_qat_checksum_disable
2. Verify alder checksum of the de-compress result
3. Allocate Digest, IV and AAD buffer in physical contiguous
   memory by QAT_PHYS_CONTIG_ALLOC.
4. Support session re-use feature in the new QAT driver, by
   waiting session lock before remove session.

Signed-off-by: Weigang Li <[email protected]>
Signed-off-by: Chengfeix Zhu <[email protected]>
@cfzhu cfzhu closed this Apr 11, 2019
@cfzhu cfzhu deleted the qat_dev branch April 11, 2019 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants