Skip to content

RFC async_tx/md: Remove async_tx framework

[email protected] dm-devel linux-crypto linux-doc linux-raid lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20261015-asycn_tx_remove-381cd003d9f7

Versions newest first

  1. v1 RFC Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4md/dm-integrity: replace async_tx with synchronous xor for journaldrivers/md/dm-integrity.c+14 -123 replies
2/4md/raid5-ppl: replace async_tx with synchronous xordrivers/md/raid5-ppl.c+16 -242 replies
3/4md/raid5: replace async_tx with synchronous xor/pq operationsdrivers/md/raid5-log.h drivers/md/raid5.c+251 -2200 replies
4/4crypto: remove async_tx frameworkDocumentation/crypto/async-tx-api.rst Documentation/crypto/index.rst crypto/Kconfig +10 more+0 -25870 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchMikulas Patocka
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 0/4] async_tx/md: Remove async_tx framework

This RFC is collecting more feedbacks to device when is good time to remove whole async_tx framework and how to remove it safely. And is overall direction correction.

Little to no real hardware acceleration usage:
Most systems run RAID5/6 parity calculations on the CPU using optimized XOR/PQ implementations, while DMAEngine-backed async_tx acceleration is rarely present or exercised.

Added abstraction and maintenance cost:
async_tx introduces an extra layer between MD RAID and parity operations, making the code harder to understand, debug, and maintain.

Modern CPUs outperform DMA offload:
SIMD implementations (SSE/AVX/NEON and architecture-specific RAID routines) often provide better performance than DMA descriptor setup and completion handling overhead.

Obsolete hardware dependencies:
Many async_tx acceleration backends were designed for older DMA/XOR engines that are no longer common in contemporary systems.

Complex asynchronous execution model:
Dependency chains, callback handling, and DMA transaction management increase code complexity without corresponding performance benefits on typical deployments.Simplifies RAID code paths: Removing async_tx allows direct use of synchronous XOR/PQ helpers, reducing indirection in raid5.c source code [linux/drivers/md/raid5.c].

Reduces testing burden:
Eliminates rarely used code paths that are difficult to validate and more likely to accumulate latent bugs.

Aligns implementation with actual usage:
The vast majority of MD RAID deployments already rely on software parity generation rather than DMA offload.

Current dmaengine support xor is

Driver File Driver Name First Added Date
==========================================================================
mv_xor.c Marvell XOR Engine (mv_xor) 2008-07-08
ppc4xx/adma.c ppc440spe ADMA (PPC4xx) 2009-12-11
fsl_raid.c Freescale RAID Engine (fsl_re) 2015-03-03
xgene-dma.c APM X-Gene DMA 2015-03-18
ioat/init.c Intel IOAT DMA (ioatdma) 2015-08-11
mv_xor_v2.c Marvell XOR Engine v2 2016-06-16
bcm-sba-raid.c BCM SBA RAID (Broadcom) 2017-05-15

fsl_raid is for power pc SoC, which already EOF.

Patches is build test only now.

To: Alasdair Kergon <[email protected]>
To: Mike Snitzer <[email protected]>
To: Mikulas Patocka <[email protected]>
To: Benjamin Marzinski <[email protected]>
To: Song Liu <[email protected]>
To: Yu Kuai <[email protected]>
To: Li Nan <[email protected]>
To: Xiao Ni <[email protected]>
To: Dan Williams <[email protected]>
To: Herbert Xu <[email protected]>
To: "David S. Miller" <[email protected]>
To: Jonathan Corbet <[email protected]>
To: Shuah Khan <[email protected]>
To: Randy Dunlap <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Anatolij Gustschin <[email protected]>
Cc: Saeed Bishara <[email protected]>
Cc: Rameshwar Prasad Sahu <[email protected]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Anup Patel <[email protected]>

---
Frank Li (4):
md/dm-integrity: replace async_tx with synchronous xor for journal md/raid5-ppl: replace async_tx with synchronous xor md/raid5: replace async_tx with synchronous xor/pq operations
crypto: remove async_tx framework

 Documentation/crypto/async-tx-api.rst | 270 ---------------
 Documentation/crypto/index.rst        |   1 -
 crypto/Kconfig                        |   5 -
 crypto/Makefile                       |   4 -
 crypto/async_tx/Kconfig               |  28 --
 crypto/async_tx/Makefile              |   7 -
 crypto/async_tx/async_memcpy.c        |  97 ------
 crypto/async_tx/async_pq.c            | 464 --------------------------
 crypto/async_tx/async_raid6_recov.c   | 595 ----------------------------------
 crypto/async_tx/async_tx.c            | 299 -----------------
 crypto/async_tx/async_xor.c           | 380 ----------------------
 crypto/async_tx/raid6test.c           | 250 --------------
 drivers/md/dm-integrity.c             |  26 +-
 drivers/md/raid5-log.h                |   4 +-
 drivers/md/raid5-ppl.c                |  40 +--
 drivers/md/raid5.c                    | 467 +++++++++++++-------------
 include/linux/async_tx.h              | 187 -----------
 17 files changed, 281 insertions(+), 2843 deletions(-)

---
base-commit: 98a4f6276df67a1bb37b1be56a3ab4285155e3df
change-id: 20261015-asycn_tx_remove-381cd003d9f7

Best regards,

Signature · 1 line
Frank Li <[email protected]>