zfs: upstream support for hardware-accelerated encryption

Bug #1857040 reported by Steve Langasek
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
In Progress
Colin Ian King
zfs-linux (Ubuntu)
Fix Released
Colin Ian King

Bug Description

I understand that in Linux 5.0+, certain encryption-related symbols have been marked GPL-only, making them unavailable for use by zfs. As a result, using encryption in zfs pools increases cpu load / decreases disk throughput.

There are a pair of upstream pull requests that should improve the performance (with performance measurement done on x86-64). Can these be pulled into the Ubuntu kernel?


Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1857040

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Steve Langasek (vorlon)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
Changed in linux (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Colin Ian King (colin-king) wrote :

Also should apply:

commit 10fa254539ec41c6b043785d4e7ab34bce383b9f
Author: Brian Behlendorf <email address hidden>
Date: Thu Oct 24 10:17:33 2019 -0700

    Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore

but this also requires a rather tricky backport of:

commit 006e9a40882468be68f276c946bae812b74ac35c
Author: Matthew Macy <email address hidden>
Date: Thu Sep 5 09:34:54 2019 -0700

    OpenZFS restructuring - move platform specific headers

and also we are dependant on a backport of:

commit 608f8749a1055e6769899788e11bd51fd396f9e5
Author: Brian Behlendorf <email address hidden>
Date: Tue Oct 1 12:50:34 2019 -0700

    Perform KABI checks in parallel

Revision history for this message
Fabian Grünbichler (f-gruenbichler) wrote :

the following backport from the 0.8.3 queue should be what you are looking for:


it does not include/depend on either of the problematic commits, but does contain all known squashed follow-up fixes.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Just got this update in focal:

* Add support for for hardware-accelerated encryption (LP: #1857040)
    and include faster KABI checks and restructuring backports to
    ease the backporting effort.
    Backport of upstream ZFS commits:
    - e5db31349484 "Linux 5.0 compat: SIMD compatibility"
    - 608f8749a105 "Perform KABI checks in parallel"
    - 095b5412b31c "Fix CONFIG_X86_DEBUG_FPU build failure"
    - b88ca2acf512 "Enable SIMD for encryption"
    - 006e9a408824 "OpenZFS restructuring - move platform specific headers"
    - 10fa254539ec "Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore"


Revision history for this message
Colin Ian King (colin-king) wrote :

The next spin of the focal kernel will pick this up when it is built with the new zfs-dkms driver.

Changed in zfs-linux (Ubuntu):
status: New → Fix Committed
status: Fix Committed → Fix Released
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
Revision history for this message
Garrett Fields (fields-g) wrote :

I just installed the linux-generic kernel from focal-proposed (5.4.0-12-generic) built 1/21/2020@15:12:29. It still included zfs-kmod version was still 0.8.2-3ubuntu4. After installing zfs-dkms, kmod version was bumped 0.8.2-3ubuntu5. Fletcher_4_bench performance increased 2.7827x (3.3294 biteswap).

I don't know the ubuntu kernel build/release process. When does 0.8.2-3ubuntu5 get included into the kernel itself?

(BTW.... upstream 0.8.3 was released yesterday 1/23/2020. 0.8.2-3ubuntu5 will likely be old anyway)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.