mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank.Li@oss.nxp.com
To: Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	 Mikulas Patocka <mpatocka@redhat.com>,
	 Benjamin Marzinski <bmarzins@redhat.com>,
	Song Liu <song@kernel.org>,  Yu Kuai <yukuai@fygo.io>,
	Li Nan <magiclinan@didiglobal.com>,  Xiao Ni <xiao@kernel.org>,
	Dan Williams <djbw@kernel.org>,
	 Herbert Xu <herbert@gondor.apana.org.au>,
	 "David S. Miller" <davem@davemloft.net>,
	Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	 Randy Dunlap <rdunlap@infradead.org>
Cc: dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
	 linux-raid@vger.kernel.org, linux-crypto@vger.kernel.org,
	 linux-doc@vger.kernel.org, Anatolij Gustschin <agust@denx.de>,
	 Saeed Bishara <saeed@marvell.com>,
	Rameshwar Prasad Sahu <rsahu@apm.com>,
	 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	 Anup Patel <anup.patel@broadcom.com>,
	Frank Li <Frank.Li@nxp.com>
Subject: [PATCH RFC 0/4] async_tx/md: Remove async_tx framework
Date: Thu, 15 Oct 2026 15:22:24 -0400	[thread overview]
Message-ID: <20261015-asycn_tx_remove-v1-0-056a7085e0a1@nxp.com> (raw)

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 <agk@redhat.com>
To: Mike Snitzer <snitzer@kernel.org>
To: Mikulas Patocka <mpatocka@redhat.com>
To: Benjamin Marzinski <bmarzins@redhat.com>
To: Song Liu <song@kernel.org>
To: Yu Kuai <yukuai@fygo.io>
To: Li Nan <magiclinan@didiglobal.com>
To: Xiao Ni <xiao@kernel.org>
To: Dan Williams <djbw@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
To: "David S. Miller" <davem@davemloft.net>
To: Jonathan Corbet <corbet@lwn.net>
To: Shuah Khan <skhan@linuxfoundation.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: dm-devel@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Cc: linux-raid@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Saeed Bishara <saeed@marvell.com>
Cc: Rameshwar Prasad Sahu <rsahu@apm.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Anup Patel <anup.patel@broadcom.com>

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
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,
--  
Frank Li <Frank.Li@nxp.com>


             reply	other threads:[~2026-10-15 19:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 19:22 Frank.Li [this message]
2026-10-15 19:22 ` [PATCH RFC 1/4] md/dm-integrity: replace async_tx with synchronous xor for journal Frank.Li
2026-10-15 19:22 ` [PATCH RFC 2/4] md/raid5-ppl: replace async_tx with synchronous xor Frank.Li
2026-10-15 19:22 ` [PATCH RFC 3/4] md/raid5: replace async_tx with synchronous xor/pq operations Frank.Li
2026-10-15 19:22 ` [PATCH RFC 4/4] crypto: remove async_tx framework Frank.Li
2026-10-15 19:51 ` [PATCH RFC 0/4] async_tx/md: Remove " Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261015-asycn_tx_remove-v1-0-056a7085e0a1@nxp.com \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=agk@redhat.com \
    --cc=agust@denx.de \
    --cc=anup.patel@broadcom.com \
    --cc=bmarzins@redhat.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=djbw@kernel.org \
    --cc=dm-devel@lists.linux.dev \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=magiclinan@didiglobal.com \
    --cc=mpatocka@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=rsahu@apm.com \
    --cc=saeed@marvell.com \
    --cc=skhan@linuxfoundation.org \
    --cc=snitzer@kernel.org \
    --cc=song@kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=xiao@kernel.org \
    --cc=yukuai@fygo.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®