Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Ravi Jonnalagadda <ravis.opensrc@gmail.com>
To: "Lynch, Nathan" <nathan.lynch@amd.com>
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	David Rientjes <rientjes@google.com>,
	John.Kariuki@amd.com, Jonathan Cameron <jic23@kernel.org>,
	Kinsey Ho <kinseyho@google.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	PradeepVineshReddy.Kodamati@amd.com,
	Shivank Garg <shivankg@amd.com>,
	Stephen Bates <Stephen.Bates@amd.com>,
	Tycho Andersen <tycho@kernel.org>, Wei Huang <wei.huang2@amd.com>,
	Wei Xu <weixugc@google.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v4 00/25] dmaengine: Smart Data Accelerator Interface (SDXI) basic support
Date: Tue,  1 Dec 2026 09:21:47 -0800	[thread overview]
Message-ID: <20261201172147.90681-1-ravis.opensrc@gmail.com> (raw)
In-Reply-To: <7913b752-ab8b-474c-8841-69674de2ff8f@amd.com>

On Mon, 30 Nov 2026 17:21:03 -0600, Nathan Lynch wrote:
> Thanks for sharing these results Ravi. Can you share the code for this
> workload, or at least give us more detail about how the transactions are
> submitted to the engine?

Hi Nathan,

Sure. The workload is a small test kernel module that uses the
dmaengine client API directly. The patch below adds it, together with
tools/dma/dma-copy-bench.sh:
- It applies on mm-new 6ec534d64f85, with or without the v4 series,
  with "git am --scissors". Build the module with
  CONFIG_DMA_COPY_BENCH=m.
- Run with no arguments, the script finds the memcpy provider and the
  DRAM and CPU-less NUMA nodes, runs the same sweep, and prints the
  table in the same format as my earlier mail. A full sweep takes
  under 3 minutes.

Setup: mm-new 6ec534d64f85 plus the 25 v4 patches only.

How the module submits the copies:
- Each channel comes from dma_request_channel() with DMA_MEMCPY and
  is driven by its own kthread, on a CPU of the DRAM node.
- Each thread copies one buffer of the copy size again and again. The
  buffer is physically contiguous on the source node, and its copy
  goes to one on the destination node. Both are mapped once.
- Each copy is one descriptor, prepared with DMA_PREP_INTERRUPT and a
  completion callback, then submitted with dma_async_issue_pending().
  The thread waits for the callback before it submits the next copy.
- So each channel has exactly one copy in flight. The 1-channel rows
  are therefore one round trip per copy: for 2 MiB at about 41 GB/s,
  about 52 us.
- The module also takes an optional queue depth. With two copies in
  flight, one channel reaches about 44 GB/s DRAM->CXL and 45 GB/s
  CXL->DRAM at 2 MiB, against 39-41 GB/s with one. At 64 KiB, two
  copies in flight about double one channel.
- From 4 channels at 2 MiB, the depth changes nothing. Calling
  dma_async_issue_pending() once per batch instead of once per
  descriptor did not help.

How the table is measured:
- GB/s = total bytes / the time from the first submit to the last
  completion over all channels.
- For the posted table, each run was 100,000 copies in bursts of up
  to 10 s, with the time summed over the bursts. The script's default
  of about 2 s per run gives the same numbers, within the variation
  below.
- The throughput runs compare only the first and last copy of each
  burst with the source. Separate runs compared every copy. All
  16.2 M copies completed with DMA_COMPLETE, and 0 of the compared
  copies mismatched.
- On this host the rows with small copies (4 KiB, and 64 KiB at 1 or
  4 channels) vary by up to about 20 % between runs. The 2 MiB rows
  and the 64 KiB 16-channel row stay within 3 %.
- The numbers are indicative and will differ between setups, for
  example with the platform and the CXL device.

Thanks,
Ravi

-- >8 --
From: Ravi Jonnalagadda <ravis.opensrc@gmail.com>
Subject: [PATCH] dmaengine: add a copy throughput test module and script

Add dma-copy-bench, a test module that measures the memcpy throughput
of DMA engine channels, and tools/dma/dma-copy-bench.sh, which runs a
sweep with it. The result is the bytes copied over all channels,
divided by the time from the start of the first copy to the end of the
last one.

Each channel is driven by one kthread on a CPU of the DRAM node. The
source and destination buffers are placed on chosen NUMA nodes and
mapped once. Every descriptor has a completion callback. By default a
channel has one copy in flight; DEPTH allows more, each with its own
buffers.

The script finds the DMA devices with memcpy channels and the DRAM and
memory-only NUMA nodes, loads the module, and runs copy sizes x
channel counts x DRAM->DRAM, DRAM->far and far->DRAM. It prints a
table of the median GB/s over the runs. -h lists the options.

Signed-off-by: Ravi Jonnalagadda <ravis.opensrc@gmail.com>
---
 MAINTAINERS                  |   1 +
 drivers/dma/Kconfig          |   9 +
 drivers/dma/Makefile         |   1 +
 drivers/dma/dma-copy-bench.c | 518 ++++++++++++++++++++++++++++++++++
 tools/dma/dma-copy-bench.sh  | 526 +++++++++++++++++++++++++++++++++++
 5 files changed, 1055 insertions(+)
 create mode 100644 drivers/dma/dma-copy-bench.c
 create mode 100755 tools/dma/dma-copy-bench.sh

diff --git a/MAINTAINERS b/MAINTAINERS
index ce05a32..7d1488e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7898,6 +7898,7 @@ F:	include/dt-bindings/dma/
 F:	include/linux/dma/
 F:	include/linux/dmaengine.h
 F:	include/linux/of_dma.h
+F:	tools/dma/dma-copy-bench.sh
 
 DMA MAPPING BENCHMARK
 M:	Barry Song <baohua@kernel.org>
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 01f96a8..a7db036 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -797,6 +797,15 @@ config DMATEST
 	  Simple DMA test client. Say N unless you're debugging a
 	  DMA Device driver.
 
+config DMA_COPY_BENCH
+	tristate "DMA copy throughput test"
+	depends on DMA_ENGINE
+	help
+	  Test module that measures the memcpy throughput of DMA channels,
+	  with a chosen number of descriptors in flight per channel. Results
+	  are reported through debugfs. Say N unless you are measuring a DMA
+	  device driver.
+
 config DMA_ENGINE_RAID
 	bool
 
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index f62d12b..3cf2ab6 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_DMA_OF) += of-dma.o
 
 #dmatest
 obj-$(CONFIG_DMATEST) += dmatest.o
+obj-$(CONFIG_DMA_COPY_BENCH) += dma-copy-bench.o
 
 #devices
 obj-$(CONFIG_ALTERA_MSGDMA) += altera-msgdma.o
diff --git a/drivers/dma/dma-copy-bench.c b/drivers/dma/dma-copy-bench.c
new file mode 100644
index 0000000..7d1c50a
--- /dev/null
+++ b/drivers/dma/dma-copy-bench.c
@@ -0,0 +1,518 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * DMA engine copy throughput test.
+ *
+ * Each channel is driven by one kthread that keeps up to DEPTH memcpy
+ * descriptors in flight. Each of them copies between its own pair of
+ * buffers. A new descriptor is submitted when the oldest one completes.
+ *
+ *   echo "SRCNODE DSTNODE SIZE ITERS_PER_CHAN NCHAN VERIFY_EVERY [DEPTH [BATCH]]" \
+ * > /sys/kernel/debug/dma-copy-bench/run
+ *   cat /sys/kernel/debug/dma-copy-bench/result
+ *
+ * VERIFY_EVERY = N checks the data of every Nth copy and of the last copy
+ * of each channel; 0 disables the check. DEPTH defaults to 1. BATCH = 1
+ * issues the pending descriptors once per DEPTH submissions instead of
+ * after each one.
+ */
+
+#include <linux/completion.h>
+#include <linux/cpumask.h>
+#include <linux/debugfs.h>
+#include <linux/dma-mapping.h>
+#include <linux/dmaengine.h>
+#include <linux/kthread.h>
+#include <linux/ktime.h>
+#include <linux/math64.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/nodemask.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/topology.h>
+#include <linux/uaccess.h>
+
+#define BENCH_MAX_CHANS 64
+#define BENCH_MAX_DEPTH 64
+#define BENCH_TIMEOUT_MS 10000
+
+static char *device = "";
+module_param(device, charp, 0444);
+MODULE_PARM_DESC(device,
+		 "Use only channels of this DMA device (dev_name), empty: any");
+
+static int cpu_node;
+module_param(cpu_node, int, 0444);
+MODULE_PARM_DESC(cpu_node, "Run the test threads on CPUs of this NUMA node");
+
+struct bench_slot {
+	struct page *sp, *dp;
+	dma_addr_t sd, dd;
+	struct completion done;
+	dma_cookie_t ck;
+	long seq;
+	bool busy, ver;
+};
+
+struct bench_chan {
+	struct task_struct *task;
+	struct dma_chan *ch;
+	char name[32];
+	struct bench_slot *slots;
+	int depth;
+	bool batch;
+	size_t size;
+	long iters, verify_every;
+	long done, errs, vfail;
+	int inflight;
+	ktime_t busy0;
+	s64 dma_ns;
+	s64 first_ns, last_ns;
+	struct completion fin;
+	struct completion *go;
+};
+
+struct bench_result {
+	int src_node, dst_node;
+	size_t size;
+	long iters, verify_every;
+	int depth;
+	bool batch;
+	int nchan;
+	int ret;
+	struct bench_chan chans[] __counted_by(nchan);
+};
+
+static struct dentry *bench_dir;
+static struct bench_result *bench_res;
+static DEFINE_MUTEX(bench_lock);
+
+static bool bench_filter(struct dma_chan *chan, void *param)
+{
+	return !*device || !strcmp(dev_name(chan->device->dev), device);
+}
+
+static void bench_copy_done(void *arg)
+{
+	complete(arg);
+}
+
+/* Prepare and submit one copy into a free slot. */
+static int bench_submit(struct bench_chan *t, struct bench_slot *sl)
+{
+	struct dma_async_tx_descriptor *tx;
+
+	reinit_completion(&sl->done);
+	tx = dmaengine_prep_dma_memcpy(t->ch, sl->dd, sl->sd, t->size,
+				       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
+	if (!tx)
+		return -ENOMEM;
+	tx->callback = bench_copy_done;
+	tx->callback_param = &sl->done;
+	sl->ck = dmaengine_submit(tx);
+	if (dma_submit_error(sl->ck))
+		return -EIO;
+	return 0;
+}
+
+/*
+ * Wait up to tmo jiffies for the copy of a busy slot and account for it.
+ * Returns 0, -ETIMEDOUT or another negative errno. The first timeout
+ * terminates all copies of the channel, so that no callback runs once the
+ * thread has returned. The remaining slots are then reaped with tmo 0.
+ */
+static int bench_reap(struct bench_chan *t, struct bench_slot *sl, long tmo)
+{
+	enum dma_status st;
+	ktime_t t1;
+	int rc = 0;
+
+	sl->busy = false;
+	if (!wait_for_completion_timeout(&sl->done, tmo)) {
+		if (tmo)
+			dmaengine_terminate_sync(t->ch);
+		rc = -ETIMEDOUT;
+	} else {
+		st = dma_async_is_tx_complete(t->ch, sl->ck, NULL, NULL);
+		if (st != DMA_COMPLETE)
+			rc = -EIO;
+	}
+	t1 = ktime_get();
+	/* The channel is busy while at least one of its copies is in flight. */
+	if (!--t->inflight)
+		t->dma_ns += ktime_to_ns(ktime_sub(t1, t->busy0));
+	t->last_ns = ktime_to_ns(t1);
+	if (rc) {
+		t->errs++;
+		return rc;
+	}
+	t->done++;
+	if (sl->ver &&
+	    memcmp(page_address(sl->sp), page_address(sl->dp), t->size))
+		t->vfail++;
+	return 0;
+}
+
+static int bench_thread(void *arg)
+{
+	struct bench_chan *t = arg;
+	long tmo = msecs_to_jiffies(BENCH_TIMEOUT_MS);
+	long i, nsub = 0, nissued = 0;
+	struct bench_slot *sl;
+	ktime_t t0;
+	int j;
+
+	wait_for_completion(t->go);
+
+	for (i = 0; i < t->iters && !kthread_should_stop(); i++) {
+		sl = &t->slots[i % t->depth];
+		if (sl->busy) {
+			/* With BATCH, the oldest copy may not be issued yet. */
+			if (sl->seq >= nissued) {
+				dma_async_issue_pending(t->ch);
+				nissued = nsub;
+			}
+			if (bench_reap(t, sl, tmo) == -ETIMEDOUT) {
+				tmo = 0;
+				break;
+			}
+		}
+
+		sl->ver = t->verify_every &&
+			  (i % t->verify_every == 0 || i == t->iters - 1);
+		if (sl->ver) {
+			u8 *s = page_address(sl->sp), *d = page_address(sl->dp);
+
+			memset(s, (u8)(i * 7 + 1), t->size);
+			s[0] = (u8)i;
+			s[t->size - 1] = (u8)(i >> 8);
+			memset(d, 0, t->size);
+		}
+		t0 = ktime_get();
+		if (!t->first_ns)
+			t->first_ns = ktime_to_ns(t0);
+		if (bench_submit(t, sl)) {
+			t->errs++;
+			continue;
+		}
+		if (!t->inflight++)
+			t->busy0 = t0;
+		sl->busy = true;
+		sl->seq = nsub++;
+		if (!t->batch || nsub - nissued >= t->depth ||
+		    i == t->iters - 1) {
+			dma_async_issue_pending(t->ch);
+			nissued = nsub;
+		}
+	}
+
+	if (nsub > nissued)
+		dma_async_issue_pending(t->ch);
+	/* Collect the copies still in flight, oldest first. */
+	for (j = 0; j < t->depth; j++) {
+		sl = &t->slots[(i + j) % t->depth];
+		if (sl->busy && bench_reap(t, sl, tmo) == -ETIMEDOUT)
+			tmo = 0;
+	}
+	complete(&t->fin);
+	return 0;
+}
+
+/*
+ * Memory that was hot-added as ZONE_MOVABLE, such as CXL memory, is only
+ * reachable by a movable allocation. The buffers are accessed through the
+ * direct map, so highmem pages are refused.
+ */
+static struct page *bench_alloc(int nid, unsigned int order)
+{
+	struct page *page;
+
+	page = alloc_pages_node(
+		nid, GFP_HIGHUSER_MOVABLE | __GFP_THISNODE | __GFP_NOWARN,
+		order);
+	if (page && PageHighMem(page)) {
+		__free_pages(page, order);
+		return NULL;
+	}
+	return page;
+}
+
+static void bench_slot_release(struct device *dev, struct bench_slot *sl,
+			       size_t size, unsigned int order)
+{
+	dma_unmap_page(dev, sl->dd, size, DMA_FROM_DEVICE);
+	dma_unmap_page(dev, sl->sd, size, DMA_TO_DEVICE);
+	__free_pages(sl->dp, order);
+	__free_pages(sl->sp, order);
+}
+
+static int bench_slot_init(struct device *dev, struct bench_slot *sl, int sn,
+			   int dn, size_t size, unsigned int order)
+{
+	sl->sp = bench_alloc(sn, order);
+	if (!sl->sp)
+		return -ENOMEM;
+	sl->dp = bench_alloc(dn, order);
+	if (!sl->dp)
+		goto err_src;
+	sl->sd = dma_map_page(dev, sl->sp, 0, size, DMA_TO_DEVICE);
+	if (dma_mapping_error(dev, sl->sd))
+		goto err_dst;
+	sl->dd = dma_map_page(dev, sl->dp, 0, size, DMA_FROM_DEVICE);
+	if (dma_mapping_error(dev, sl->dd))
+		goto err_unmap;
+	init_completion(&sl->done);
+	return 0;
+
+err_unmap:
+	dma_unmap_page(dev, sl->sd, size, DMA_TO_DEVICE);
+err_dst:
+	__free_pages(sl->dp, order);
+err_src:
+	__free_pages(sl->sp, order);
+	return -ENOMEM;
+}
+
+static int bench_chan_init(struct bench_chan *bc, int sn, int dn,
+			   unsigned int order)
+{
+	struct device *dev;
+	dma_cap_mask_t mask;
+	int i, ret = -ENOMEM;
+
+	dma_cap_zero(mask);
+	dma_cap_set(DMA_MEMCPY, mask);
+	bc->ch = dma_request_channel(mask, bench_filter, NULL);
+	if (!bc->ch)
+		return -ENODEV;
+	strscpy(bc->name, dma_chan_name(bc->ch));
+	dev = bc->ch->device->dev;
+
+	bc->slots = kcalloc(bc->depth, sizeof(*bc->slots), GFP_KERNEL);
+	if (!bc->slots)
+		goto err_chan;
+	for (i = 0; i < bc->depth; i++) {
+		ret = bench_slot_init(dev, &bc->slots[i], sn, dn, bc->size,
+				      order);
+		if (ret)
+			goto err_slots;
+	}
+	init_completion(&bc->fin);
+	return 0;
+
+err_slots:
+	while (i--)
+		bench_slot_release(dev, &bc->slots[i], bc->size, order);
+	kfree(bc->slots);
+err_chan:
+	dma_release_channel(bc->ch);
+	bc->ch = NULL;
+	return ret;
+}
+
+static void bench_chan_release(struct bench_chan *bc, unsigned int order)
+{
+	struct device *dev = bc->ch->device->dev;
+	int i;
+
+	for (i = 0; i < bc->depth; i++)
+		bench_slot_release(dev, &bc->slots[i], bc->size, order);
+	kfree(bc->slots);
+	dma_release_channel(bc->ch);
+	bc->ch = NULL;
+}
+
+static bool bench_mem_node(int nid)
+{
+	return nid >= 0 && nid < MAX_NUMNODES && node_state(nid, N_MEMORY);
+}
+
+static int bench_run(int sn, int dn, size_t size, long iters, int nchan,
+		     long verify_every, int depth, int batch)
+{
+	const struct cpumask *cpus;
+	struct bench_result *res;
+	struct completion go;
+	unsigned int order;
+	int i, n, ret = 0;
+
+	if (!bench_mem_node(sn) || !bench_mem_node(dn) || !size ||
+	    get_order(size) > MAX_PAGE_ORDER || iters < 1 || nchan < 1 ||
+	    nchan > BENCH_MAX_CHANS || verify_every < 0 || depth < 1 ||
+	    depth > BENCH_MAX_DEPTH || batch < 0 || batch > 1)
+		return -EINVAL;
+	if (cpu_node < 0 || cpu_node >= MAX_NUMNODES || !node_online(cpu_node))
+		return -EINVAL;
+	cpus = cpumask_of_node(cpu_node);
+	if (cpumask_empty(cpus))
+		return -EINVAL;
+	order = get_order(size);
+
+	kfree(bench_res);
+	bench_res = NULL;
+	res = kzalloc(struct_size(res, chans, nchan), GFP_KERNEL);
+	if (!res)
+		return -ENOMEM;
+	res->nchan = nchan;
+	res->src_node = sn;
+	res->dst_node = dn;
+	res->size = size;
+	res->iters = iters;
+	res->verify_every = verify_every;
+	res->depth = depth;
+	res->batch = batch;
+
+	init_completion(&go);
+	for (n = 0; n < nchan; n++) {
+		struct bench_chan *bc = &res->chans[n];
+
+		bc->size = size;
+		bc->iters = iters;
+		bc->verify_every = verify_every;
+		bc->depth = depth;
+		bc->batch = batch;
+		bc->go = &go;
+		ret = bench_chan_init(bc, sn, dn, order);
+		if (ret)
+			goto out_release;
+	}
+
+	/* Threads are woken only once all exist, then released together. */
+	for (i = 0; i < nchan; i++) {
+		struct task_struct *task;
+
+		task = kthread_create(bench_thread, &res->chans[i],
+				      "dma_bench/%d", i);
+		if (IS_ERR(task)) {
+			ret = PTR_ERR(task);
+			while (i--)
+				kthread_stop_put(res->chans[i].task);
+			goto out_release;
+		}
+		get_task_struct(task);
+		kthread_bind(task, cpumask_nth(i % cpumask_weight(cpus), cpus));
+		res->chans[i].task = task;
+	}
+	for (i = 0; i < nchan; i++)
+		wake_up_process(res->chans[i].task);
+	complete_all(&go);
+
+	for (i = 0; i < nchan; i++) {
+		if (wait_for_completion_killable(&res->chans[i].fin)) {
+			ret = -EINTR;
+			break;
+		}
+	}
+	for (i = 0; i < nchan; i++)
+		kthread_stop_put(res->chans[i].task);
+
+out_release:
+	while (n--)
+		bench_chan_release(&res->chans[n], order);
+	res->ret = ret;
+	bench_res = res;
+	return ret;
+}
+
+static ssize_t run_write(struct file *file, const char __user *ubuf,
+			 size_t count, loff_t *ppos)
+{
+	int sn, dn, nchan, depth = 1, batch = 0, ret;
+	long iters, verify_every;
+	char buf[128];
+	size_t size;
+
+	if (count >= sizeof(buf))
+		return -EINVAL;
+	if (copy_from_user(buf, ubuf, count))
+		return -EFAULT;
+	buf[count] = '\0';
+	if (sscanf(buf, "%d %d %zu %ld %d %ld %d %d", &sn, &dn, &size, &iters,
+		   &nchan, &verify_every, &depth, &batch) < 6)
+		return -EINVAL;
+
+	mutex_lock(&bench_lock);
+	ret = bench_run(sn, dn, size, iters, nchan, verify_every, depth, batch);
+	mutex_unlock(&bench_lock);
+
+	return ret ? ret : count;
+}
+
+static const struct file_operations run_fops = {
+	.owner = THIS_MODULE,
+	.write = run_write,
+};
+
+static int result_show(struct seq_file *m, void *v)
+{
+	struct bench_result *res;
+	s64 first = S64_MAX, last = 0, wall = 0;
+	long done = 0, errs = 0, vfail = 0;
+	u64 bytes;
+	int i;
+
+	mutex_lock(&bench_lock);
+	res = bench_res;
+	if (!res) {
+		seq_puts(m, "no result\n");
+		goto out;
+	}
+	for (i = 0; i < res->nchan; i++) {
+		struct bench_chan *bc = &res->chans[i];
+
+		done += bc->done;
+		errs += bc->errs;
+		vfail += bc->vfail;
+		if (bc->first_ns && bc->first_ns < first)
+			first = bc->first_ns;
+		if (bc->last_ns > last)
+			last = bc->last_ns;
+	}
+	if (last > first)
+		wall = last - first;
+	bytes = (u64)done * res->size;
+
+	seq_printf(
+		m,
+		"src_node %d dst_node %d size %zu iters_per_chan %ld nchan %d verify_every %ld depth %d batch %d ret %d\n",
+		res->src_node, res->dst_node, res->size, res->iters, res->nchan,
+		res->verify_every, res->depth, res->batch, res->ret);
+	seq_printf(m, "copies %ld errors %ld verify_failures %ld\n", done, errs,
+		   vfail);
+	seq_printf(m, "bytes %llu wall_ns %lld MB/s %llu\n", bytes, wall,
+		   wall ? div64_u64(bytes * 1000, wall) : 0);
+	for (i = 0; i < res->nchan; i++) {
+		struct bench_chan *bc = &res->chans[i];
+
+		seq_printf(
+			m,
+			"chan %d %s copies %ld errors %ld busy_ns %lld first_ns %lld last_ns %lld\n",
+			i, bc->name, bc->done, bc->errs, bc->dma_ns,
+			bc->first_ns ? bc->first_ns - first : -1,
+			bc->last_ns ? bc->last_ns - first : -1);
+	}
+out:
+	mutex_unlock(&bench_lock);
+	return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(result);
+
+static int __init dma_copy_bench_init(void)
+{
+	bench_dir = debugfs_create_dir("dma-copy-bench", NULL);
+	debugfs_create_file("run", 0200, bench_dir, NULL, &run_fops);
+	debugfs_create_file("result", 0400, bench_dir, NULL, &result_fops);
+	return 0;
+}
+module_init(dma_copy_bench_init);
+
+static void __exit dma_copy_bench_exit(void)
+{
+	debugfs_remove(bench_dir);
+	kfree(bench_res);
+}
+module_exit(dma_copy_bench_exit);
+
+MODULE_DESCRIPTION("DMA engine copy throughput test");
+MODULE_LICENSE("GPL");
diff --git a/tools/dma/dma-copy-bench.sh b/tools/dma/dma-copy-bench.sh
new file mode 100755
index 0000000..f874594
--- /dev/null
+++ b/tools/dma/dma-copy-bench.sh
@@ -0,0 +1,526 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+#
+# Run a memcpy throughput sweep with the dma-copy-bench module.
+#
+# The sweep covers copy sizes x channel counts x three directions:
+# DRAM->DRAM, DRAM->FAR and FAR->DRAM. FAR is a NUMA node with memory and
+# no CPUs, such as CXL memory. Each run lasts about a set time, or does a
+# set number of copies. Runs can be split into bursts of a bounded length
+# with idle time between them. Each channel can keep several copies in
+# flight.
+
+set -u
+start_ns=$(date +%s%N)
+
+sizes="4K,64K,2M"
+chans="1,4,16"
+depths="1"
+batch=0
+runs=3
+time_s=2
+copies=""
+burst_s=0
+gap_s=0
+verify_all=0
+device=""
+dram=""
+far=""
+module=""
+csv=""
+ranges=0
+
+usage() {
+ cat <<EOF
+Usage: ${0##*/} [options]
+
+Measure DMA memcpy throughput with the dma-copy-bench module.
+
+  -d DEVICE  DMA device (dev_name) to test; needed if several are found
+  -s NODE    DRAM node (default: the device's node if it has CPUs,
+             else the first node with CPUs)
+  -t NODE    far memory node, without CPUs (default: the first one)
+  -z SIZES   copy sizes, comma separated, K/M suffix (default: $sizes)
+  -c CHANS   channel counts, comma separated (default: $chans)
+  -q DEPTHS  copies in flight per channel, comma separated (default: $depths)
+  -B         issue the pending copies once per DEPTH copies, not each copy
+  -r RUNS    runs per cell (default: $runs)
+  -T SECS    length of each run (default: $time_s)
+  -n COPIES  copies per run, over all channels, instead of -T
+  -b SECS    longest burst of copies; 0 means no bursts (default: $burst_s)
+  -g SECS    idle time between bursts (default: $gap_s)
+  -V         verify every copy (default: first and last of each run,
+             or of each burst)
+  -m PATH    insmod PATH instead of modprobe dma-copy-bench
+  -o FILE    also write one CSV line per run to FILE
+  -R         print median [min-max] instead of the median
+  -h         show this help
+
+The test threads run on CPUs of the DRAM node. Must be run as root.
+EOF
+}
+
+die() {
+ echo "${0##*/}: $*" >&2
+ exit 1
+}
+
+is_uint() {
+ [[ $1 =~ ^[0-9]+$ ]]
+}
+
+is_num() {
+ [[ $1 =~ ^[0-9]+(\.[0-9]+)?$ ]]
+}
+
+to_bytes() {
+ case $1 in
+ *[kK]) echo $((${1%?} * 1024)) ;;
+ *[mM]) echo $((${1%?} * 1024 * 1024)) ;;
+ *) echo "$1" ;;
+ esac
+}
+
+size_label() {
+ if (($1 % 1048576 == 0)); then
+ echo "$(($1 / 1048576)) MiB"
+ elif (($1 % 1024 == 0)); then
+ echo "$(($1 / 1024)) KiB"
+ else
+ echo "$1 B"
+ fi
+}
+
+while getopts "d:s:t:z:c:q:Br:T:n:b:g:Vm:o:Rh" opt; do
+ case $opt in
+ d) device=$OPTARG ;;
+ s) dram=$OPTARG ;;
+ t) far=$OPTARG ;;
+ z) sizes=$OPTARG ;;
+ c) chans=$OPTARG ;;
+ q) depths=$OPTARG ;;
+ B) batch=1 ;;
+ r) runs=$OPTARG ;;
+ T) time_s=$OPTARG ;;
+ n) copies=$OPTARG ;;
+ b) burst_s=$OPTARG ;;
+ g) gap_s=$OPTARG ;;
+ V) verify_all=1 ;;
+ m) module=$OPTARG ;;
+ o) csv=$OPTARG ;;
+ R) ranges=1 ;;
+ h) usage; exit 0 ;;
+ *) usage >&2; exit 2 ;;
+ esac
+done
+shift $((OPTIND - 1))
+(($# == 0)) || { usage >&2; exit 2; }
+
+for v in "$runs" ${copies:+"$copies"}; do
+ if ! is_uint "$v" || ((v == 0)); then
+ die "bad count: $v"
+ fi
+done
+if ! is_num "$time_s" || ! is_num "$burst_s" || ! is_num "$gap_s"; then
+ die "bad -T, -b or -g value"
+fi
+to_ns() {
+ awk -v s="$1" 'BEGIN { printf "%d", s * 1e9 }'
+}
+time_ns=$(to_ns "$time_s")
+burst_ns=$(to_ns "$burst_s")
+gap_ns=$(to_ns "$gap_s")
+[ -n "$copies" ] || ((time_ns > 0)) || die "bad -T value: $time_s"
+for v in "$dram" "$far"; do
+ [ -z "$v" ] || is_uint "$v" || die "bad node: $v"
+done
+IFS=, read -ra size_list <<< "$sizes"
+IFS=, read -ra chan_list <<< "$chans"
+IFS=, read -ra depth_list <<< "$depths"
+for i in "${!size_list[@]}"; do
+ [[ ${size_list[i]} =~ ^[0-9]+[kKmM]?$ ]] || die "bad size: ${size_list[i]}"
+ size_list[i]=$(to_bytes "${size_list[i]}")
+ ((size_list[i] > 0)) || die "bad size: 0"
+done
+for c in "${chan_list[@]}"; do
+ if ! is_uint "$c" || ((c == 0)); then
+ die "bad channel count: $c"
+ fi
+done
+for q in "${depth_list[@]}"; do
+ if ! is_uint "$q" || ((q == 0 || q > 64)); then
+ die "bad depth: $q (1-64)"
+ fi
+done
+((EUID == 0)) || die "must be run as root"
+
+# Two sweeps at once would share the module and the channels.
+exec 9> /run/dma-copy-bench.lock
+flock -n 9 || die "another ${0##*/} is running"
+
+# The module allocates each buffer as one block of pages.
+max_order=$(awk '/^Free pages count per migrate type at order/ { print $NF; exit }' \
+ /proc/pagetypeinfo 2>/dev/null)
+if is_uint "${max_order:-}"; then
+ max_size=$(($(getconf PAGESIZE) << max_order))
+ for s in "${size_list[@]}"; do
+ ((s <= max_size)) ||
+ die "bad size: $(size_label "$s") (at most $(size_label "$max_size"))"
+ done
+fi
+
+# DMA devices: channels whose "cap" file, if there is one, lists memcpy.
+declare -A dev_chans dev_free dev_node
+for c in /sys/class/dma/*; do
+ [ -e "$c/device" ] || continue
+ cap=""
+ [ -r "$c/cap" ] && cap=$c/cap
+ [ -r "$c/device/cap" ] && cap=$c/device/cap
+ if [ -n "$cap" ] && ! grep -qi memcpy "$cap"; then
+ continue
+ fi
+ dev=$(basename "$(readlink -f "$c/device")")
+ dev_chans[$dev]=$((${dev_chans[$dev]:-0} + 1))
+ [ "$(cat "$c/in_use" 2>/dev/null)" = 0 ] &&
+ dev_free[$dev]=$((${dev_free[$dev]:-0} + 1))
+ dev_node[$dev]=$(cat "$c/device/numa_node" 2>/dev/null || echo -1)
+done
+
+list_devices() {
+ local d
+
+ for d in "${!dev_chans[@]}"; do
+ printf '  %-16s node %-3s channels %s (free %s)\n' "$d" \
+ "${dev_node[$d]}" "${dev_chans[$d]}" "${dev_free[$d]:-0}"
+ done | sort
+}
+
+((${#dev_chans[@]})) || die "no DMA device with memcpy channels found"
+echo "DMA devices with memcpy channels:"
+list_devices
+if [ -z "$device" ]; then
+ if ((${#dev_chans[@]} > 1)); then
+ echo "Several DMA devices found; choose one with -d." >&2
+ exit 1
+ fi
+ device=${!dev_chans[*]}
+fi
+[ -n "${dev_chans[$device]:-}" ] || die "no memcpy channels on device $device"
+free=${dev_free[$device]:-0}
+((free > 0)) || die "no free channel on device $device"
+((free > 64)) && free=64
+
+# NUMA nodes: with CPUs, or memory only.
+nodes=()
+for p in /sys/devices/system/node/node[0-9]*; do
+ [ -e "$p" ] && nodes+=("${p##*node}")
+done
+cpu_nodes=()
+mem_nodes=()
+for n in $(printf '%s\n' "${nodes[@]}" | sort -n); do
+ p=/sys/devices/system/node/node$n
+ if [ -n "$(tr -d '[:space:]' < "$p/cpulist")" ]; then
+ cpu_nodes+=("$n")
+ elif (($(awk '/MemTotal/ { print $4 }' "$p/meminfo") > 0)); then
+ mem_nodes+=("$n")
+ fi
+done
+((${#cpu_nodes[@]})) || die "no NUMA node with CPUs found"
+echo "Nodes with CPUs: ${cpu_nodes[*]}; memory-only nodes: ${mem_nodes[*]:-none}"
+
+has_cpus() {
+ [[ " ${cpu_nodes[*]} " == *" $1 "* ]]
+}
+
+if [ -z "$dram" ]; then
+ if has_cpus "${dev_node[$device]}"; then
+ dram=${dev_node[$device]}
+ why="the node of $device"
+ else
+ dram=${cpu_nodes[0]}
+ why="the first node with CPUs"
+ fi
+else
+ [ -e "/sys/devices/system/node/node$dram" ] || die "no node $dram"
+ has_cpus "$dram" || die "node $dram has no CPUs"
+ why="-s"
+fi
+echo "DRAM node: $dram ($why)"
+if [ -z "$far" ] && ((${#mem_nodes[@]})); then
+ far=${mem_nodes[0]}
+ echo "Far node: $far (the first memory-only node)"
+elif [ -n "$far" ]; then
+ [ -e "/sys/devices/system/node/node$far" ] || die "no node $far"
+ ! has_cpus "$far" || die "node $far has CPUs; -t needs a memory-only node"
+ [[ " ${mem_nodes[*]} " == *" $far "* ]] || die "node $far has no memory"
+ echo "Far node: $far (-t)"
+else
+ echo "Far node: none (no memory-only node), running DRAM->DRAM only"
+fi
+
+# Name the far node CXL when a CXL region provides its memory.
+far_name=FAR
+if [ -n "$far" ]; then
+ for d in /sys/bus/dax/devices/dax*; do
+ [ "$(cat "$d/target_node" 2>/dev/null)" = "$far" ] || continue
+ case $(readlink -f "$d") in
+ */region[0-9]*) far_name=CXL ;;
+ esac
+ done
+fi
+
+dirs=(D2D)
+[ -n "$far" ] && dirs+=(D2F F2D)
+
+# Channel counts above the free channels are capped.
+declare -A seen
+nchans=()
+for c in "${chan_list[@]}"; do
+ if ((c > free)); then
+ echo "${0##*/}: $c channels capped to the $free free ones" >&2
+ c=$free
+ fi
+ [ -n "${seen[$c]:-}" ] && continue
+ seen[$c]=1
+ nchans+=("$c")
+done
+echo "Device $device: ${dev_chans[$device]} channels, $free free; channel counts: ${nchans[*]}"
+
+dbgfs=$(awk '$3 == "debugfs" { print $2; exit }' /proc/mounts)
+[ -n "$dbgfs" ] || die "debugfs is not mounted (mount -t debugfs none /sys/kernel/debug)"
+
+loaded=0
+unload() {
+ if ((loaded)); then
+ rmmod dma_copy_bench
+ fi
+}
+trap unload EXIT
+trap 'exit 130' HUP INT TERM
+
+if [ -d /sys/module/dma_copy_bench ]; then
+ p=/sys/module/dma_copy_bench/parameters
+ if [ "$(cat "$p/device")" != "$device" ] ||
+   [ "$(cat "$p/cpu_node")" != "$dram" ]; then
+ cur="device=$(cat "$p/device") cpu_node=$(cat "$p/cpu_node")"
+ die "dma-copy-bench is loaded with $cur; unload it first"
+ fi
+ echo "dma-copy-bench already loaded; it stays loaded"
+elif [ -n "$module" ]; then
+ insmod "$module" device="$device" cpu_node="$dram" || die "insmod $module failed"
+ loaded=1
+else
+ modprobe dma-copy-bench device="$device" cpu_node="$dram" ||
+ die "modprobe dma-copy-bench failed (CONFIG_DMA_COPY_BENCH=m, or use -m)"
+ loaded=1
+fi
+run_file=$dbgfs/dma-copy-bench/run
+result_file=$dbgfs/dma-copy-bench/result
+[ -w "$run_file" ] || die "$run_file not found"
+
+if [ -n "$csv" ]; then
+ cols="size,channels,direction,src_node,dst_node,run"
+ cols+=",copies,errors,verify_failures,bytes,wall_ns,gbps,bursts"
+ echo "$cols,depth,batch" > "$csv"
+fi
+
+busy_ns=0
+copy_ns=0
+idle_ns=0
+# burst SRC DST SIZE ITERS NCHAN VERIFY_EVERY DEPTH EST_NS
+# Sets b_copies, b_errs, b_vfail, b_bytes and b_wall. Waits for the idle
+# time first if this burst would make the copying since the last idle
+# time longer than the burst limit.
+burst() {
+ local est=$9 err
+
+ if ((burst_ns && busy_ns && busy_ns + est > burst_ns)); then
+ sleep "$gap_s"
+ idle_ns=$((idle_ns + gap_ns))
+ busy_ns=0
+ fi
+ if ! err=$({ echo "${@:1:8}" > "$run_file"; } 2>&1); then
+ echo "  run '${*:1:8}' failed: ${err##*: }" >&2
+ return 1
+ fi
+ read -r b_copies b_errs b_vfail b_bytes b_wall b_depth < <(awk '
+ /^src_node / { q = 1; for (i = 1; i < NF; i++) if ($i == "depth") q = $(i + 1) }
+ /^copies / { c = $2; e = $4; f = $6 }
+ /^bytes / { b = $2; w = $4 }
+ END { print c + 0, e + 0, f + 0, b + 0, w + 0, q + 0 }' "$result_file")
+ if ((b_depth != $7)); then
+ echo "  run '${*:1:8}': the module does not support DEPTH" >&2
+ return 1
+ fi
+ busy_ns=$((busy_ns + b_wall))
+ copy_ns=$((copy_ns + b_wall))
+}
+
+# one_run SRC DST SIZE NCHAN ITERS DEPTH: ITERS copies per channel, in bursts.
+# Uses and updates rate_ns, the time of one copy per channel; 0 is unknown.
+# Sets r_copies, r_errs, r_vfail, r_bytes, r_wall and r_bursts.
+one_run() {
+ local left=$5 chunk n ve
+
+ r_copies=0 r_errs=0 r_vfail=0 r_bytes=0 r_wall=0 r_bursts=0
+ while ((left > 0)); do
+ chunk=$left
+ if ((burst_ns)); then
+ if ((rate_ns)); then
+ chunk=$((burst_ns / rate_ns))
+ else
+ chunk=200
+ fi
+ ((chunk > 0)) || chunk=1
+ fi
+ n=$((left < chunk ? left : chunk))
+ ve=$n
+ ((verify_all)) && ve=1
+ burst "$1" "$2" "$3" "$n" "$4" "$ve" "$6" "$batch" \
+ $((n * rate_ns)) || return 1
+ left=$((left - n))
+ r_bursts=$((r_bursts + 1))
+ r_copies=$((r_copies + b_copies))
+ r_errs=$((r_errs + b_errs))
+ r_vfail=$((r_vfail + b_vfail))
+ r_bytes=$((r_bytes + b_bytes))
+ r_wall=$((r_wall + b_wall))
+ ((rate_ns)) || rate_ns=$((b_wall / n))
+ ((rate_ns > 0)) || rate_ns=1
+ done
+}
+
+declare -A gbps
+declare -A label=([D2D]="DRAM->DRAM" [D2F]="DRAM->$far_name" [F2D]="$far_name->DRAM")
+tot_copies=0
+tot_want=0
+tot_errs=0
+tot_vfail=0
+failed=0
+
+# one_cell SIZE NCHAN DEPTH DIR: the runs of one table cell.
+one_cell() {
+ local size=$1 nch=$2 q=$3 d=$4 src dst per_chan r g qd row
+
+ case $d in
+ D2D) src=$dram dst=$dram ;;
+ D2F) src=$dram dst=$far ;;
+ F2D) src=$far dst=$dram ;;
+ esac
+ rate_ns=0
+ if [ -n "$copies" ]; then
+ per_chan=$((copies / nch))
+ else
+ # Calibrate the copy count of the runs of this cell.
+ if ! one_run "$src" "$dst" "$size" "$nch" 200 "$q" ||
+   ((r_errs || r_vfail)); then
+ echo "  calibration failed" >&2
+ failed=1
+ return
+ fi
+ per_chan=$((time_ns / rate_ns))
+ fi
+ ((per_chan > 0)) || per_chan=1
+ qd=""
+ ((show_depth)) && qd=" depth $q"
+ for ((r = 1; r <= runs; r++)); do
+ one_run "$src" "$dst" "$size" "$nch" "$per_chan" "$q" ||
+ failed=1
+ g=$(awk -v b="$r_bytes" -v w="$r_wall" \
+ 'BEGIN { printf "%.3f", w ? b / w : 0 }')
+ gbps[$size,$nch,$q,$d]+="$g "
+ tot_copies=$((tot_copies + r_copies))
+ tot_want=$((tot_want + per_chan * nch))
+ tot_errs=$((tot_errs + r_errs))
+ tot_vfail=$((tot_vfail + r_vfail))
+ printf '%s %2d ch%s %-10s run %d: %s GB/s' \
+ "$(size_label "$size")" "$nch" "$qd" \
+ "${label[$d]}" "$r" "$g" >&2
+ printf ', copies %d, errors %d, verify failures %d\n' \
+ "$r_copies" "$r_errs" "$r_vfail" >&2
+ [ -n "$csv" ] || continue
+ row=("$size" "$nch" "${label[$d]}" "$src" "$dst" "$r")
+ row+=("$r_copies" "$r_errs" "$r_vfail" "$r_bytes")
+ row+=("$r_wall" "$g" "$r_bursts" "$q" "$batch")
+ (IFS=,; echo "${row[*]}") >> "$csv"
+ done
+}
+
+# A depth column is shown only when several depths are measured.
+show_depth=0
+((${#depth_list[@]} > 1)) && show_depth=1
+
+for size in "${size_list[@]}"; do
+ for nch in "${nchans[@]}"; do
+ for q in "${depth_list[@]}"; do
+ for d in "${dirs[@]}"; do
+ one_cell "$size" "$nch" "$q" "$d"
+ done
+ done
+ done
+done
+
+cell() {
+ echo "$1" | tr ' ' '\n' | sed '/^$/d' | sort -g | awk -v r="$ranges" '
+ { v[NR] = $1 }
+ END {
+ if (!NR) { printf "-"; exit }
+ m = NR % 2 ? v[(NR + 1) / 2] : (v[NR / 2] + v[NR / 2 + 1]) / 2
+ if (r)
+ printf "%.1f [%.1f-%.1f]", m, v[1], v[NR]
+ else
+ printf "%.1f", m
+ }'
+}
+
+stat=median
+((ranges)) && stat="median [min-max]"
+echo
+qnote=""
+((!show_depth && depth_list[0] != 1)) && qnote+=", depth ${depth_list[0]}"
+((batch)) && qnote+=", issued once per depth"
+if [ -n "$copies" ]; then
+ echo "GB/s, $stat of $runs runs of $copies copies$qnote"
+else
+ echo "GB/s, $stat of $runs runs of about $time_s s$qnote"
+fi
+echo "DRAM = node $dram${far:+, $far_name = node $far}"
+echo
+declare -A width
+hdr="size   | channels"
+sep="-------+---------"
+if ((show_depth)); then
+ hdr+=" | depth"
+ sep+="-+------"
+fi
+for d in "${dirs[@]}"; do
+ w=${#label[$d]}
+ ((ranges && w < 17)) && w=17
+ width[$d]=$w
+ hdr+=$(printf ' | %*s' "$w" "${label[$d]}")
+ sep+="-+-$(printf '%*s' "$w" '' | tr ' ' -)"
+done
+echo "$hdr"
+echo "$sep"
+for size in "${size_list[@]}"; do
+ for nch in "${nchans[@]}"; do
+ for q in "${depth_list[@]}"; do
+ line=$(printf '%-6s | %-8s' "$(size_label "$size")" "$nch")
+ ((show_depth)) && line+=$(printf ' | %-5s' "$q")
+ for d in "${dirs[@]}"; do
+ line+=$(printf ' | %*s' "${width[$d]}" \
+ "$(cell "${gbps[$size,$nch,$q,$d]:-}")")
+ done
+ echo "$line"
+ done
+ done
+done
+echo
+echo "copies $tot_copies of $tot_want, errors $tot_errs, verify failures $tot_vfail"
+awk -v t="$(($(date +%s%N) - start_ns))" -v c="$copy_ns" -v i="$idle_ns" 'BEGIN {
+ printf "time %.1f s: copying %.1f s, idle %.1f s\n", t / 1e9, c / 1e9, i / 1e9
+}'
+
+if ((failed || tot_errs || tot_vfail || tot_copies != tot_want)); then
+ exit 1
+fi

      reply	other threads:[~2026-12-01 17:21 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  2:49 [PATCH v4 00/25] dmaengine: Smart Data Accelerator Interface (SDXI) basic support Nathan Lynch via B4 Relay
2026-11-04  2:49 ` [PATCH v4 01/25] PCI: Add SNIA SDXI accelerator sub-class Nathan Lynch via B4 Relay
2026-11-04  2:55   ` sashiko-bot
2026-11-05 18:10   ` Frank Li
2026-11-05 18:25     ` Lynch, Nathan
2026-11-12 21:28   ` Bjorn Helgaas
2026-11-04  2:49 ` [PATCH v4 02/25] MAINTAINERS: Add entry for SDXI driver Nathan Lynch via B4 Relay
2026-11-12 21:19   ` Frank Li
2026-11-17 21:52     ` Lynch, Nathan
2026-11-04  2:49 ` [PATCH v4 03/25] dmaengine: sdxi: Add PCI initialization Nathan Lynch via B4 Relay
2026-11-04  2:56   ` sashiko-bot
2026-11-05 17:59   ` Frank Li
2026-11-05 18:07     ` Lynch, Nathan
2026-11-25  1:01   ` Jonathan Cameron
2026-11-30 16:53     ` Lynch, Nathan
2026-11-04  2:49 ` [PATCH v4 04/25] dmaengine: sdxi: Prepare function and sanitize MMIO state Nathan Lynch via B4 Relay
2026-11-04  3:06   ` sashiko-bot
2026-11-12 21:26   ` Frank Li
2026-11-17 22:01     ` Lynch, Nathan
2026-11-04  2:49 ` [PATCH v4 05/25] dmaengine: sdxi: Feature discovery and initial configuration Nathan Lynch via B4 Relay
2026-11-04  2:54   ` sashiko-bot
2026-11-12 21:32   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 06/25] dmaengine: sdxi: Configure context tables Nathan Lynch via B4 Relay
2026-11-04  2:55   ` sashiko-bot
2026-11-12 21:49   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 07/25] dmaengine: sdxi: Allocate context control DMA pool Nathan Lynch via B4 Relay
2026-11-04  2:54   ` sashiko-bot
2026-11-12 21:50   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 08/25] dmaengine: sdxi: Introduce submission queue Nathan Lynch via B4 Relay
2026-11-04  2:56   ` sashiko-bot
2026-11-12 21:58   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 09/25] dmaengine: sdxi: Allocate administrative context Nathan Lynch via B4 Relay
2026-11-04  2:56   ` sashiko-bot
2026-11-12 22:10   ` Frank Li
2026-11-17 22:08     ` Lynch, Nathan
2026-11-04  2:49 ` [PATCH v4 10/25] dmaengine: sdxi: Install " Nathan Lynch via B4 Relay
2026-11-04  2:58   ` sashiko-bot
2026-11-12 22:17   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 11/25] dmaengine: sdxi: Start functions on probe, stop on remove Nathan Lynch via B4 Relay
2026-11-04  3:04   ` sashiko-bot
2026-11-17 22:10     ` Lynch, Nathan
2026-11-13 16:44   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 12/25] dmaengine: sdxi: Add client context allocation API Nathan Lynch via B4 Relay
2026-11-04  3:02   ` sashiko-bot
2026-11-13 16:46   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 13/25] dmaengine: sdxi: Add descriptor ring management Nathan Lynch via B4 Relay
2026-11-04  3:08   ` sashiko-bot
2026-11-13 16:51   ` Frank Li
2026-11-17 22:33     ` Lynch, Nathan
2026-11-04  2:49 ` [PATCH v4 14/25] dmaengine: sdxi: Add unit tests for descriptor ring reservations Nathan Lynch via B4 Relay
2026-11-04  3:02   ` sashiko-bot
2026-11-17 22:35     ` Lynch, Nathan
2026-11-13 16:53   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 15/25] dmaengine: sdxi: Per-context access key (AKey) table entry allocator Nathan Lynch via B4 Relay
2026-11-04  2:59   ` sashiko-bot
2026-11-13 16:55   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 16/25] dmaengine: sdxi: Add completion status block API Nathan Lynch via B4 Relay
2026-11-04  2:59   ` sashiko-bot
2026-11-13 17:04   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 17/25] dmaengine: sdxi: Add unit tests for completion pool ownership Nathan Lynch via B4 Relay
2026-11-04  3:00   ` sashiko-bot
2026-11-13 17:07   ` Frank Li
2026-11-04  2:49 ` [PATCH v4 18/25] dmaengine: sdxi: Add context submission helper Nathan Lynch via B4 Relay
2026-11-04  3:01   ` sashiko-bot
2026-11-13 17:12   ` Frank Li
2026-11-17 22:49     ` Lynch, Nathan
2026-11-04  2:50 ` [PATCH v4 19/25] dmaengine: sdxi: Encode context start, stop, update, and sync descriptors Nathan Lynch via B4 Relay
2026-11-04  3:01   ` sashiko-bot
2026-11-05 16:52   ` Tycho Andersen
2026-11-17 22:51     ` Lynch, Nathan
2026-11-13 17:17   ` Frank Li
2026-11-17 23:00     ` Lynch, Nathan
2026-11-04  2:50 ` [PATCH v4 20/25] dmaengine: sdxi: Add client context release with update and sync Nathan Lynch via B4 Relay
2026-11-04  3:12   ` sashiko-bot
2026-11-13 17:23   ` Frank Li
2026-11-04  2:50 ` [PATCH v4 21/25] dmaengine: sdxi: Provide context start and stop APIs Nathan Lynch via B4 Relay
2026-11-04  3:04   ` sashiko-bot
2026-11-13 17:24   ` Frank Li
2026-11-04  2:50 ` [PATCH v4 22/25] dmaengine: sdxi: Encode copy and interrupt descriptors Nathan Lynch via B4 Relay
2026-11-04  3:07   ` sashiko-bot
2026-11-05 17:00   ` Tycho Andersen
2026-11-13 17:28   ` Frank Li
2026-11-04  2:50 ` [PATCH v4 23/25] dmaengine: sdxi: Add unit tests for descriptor encoding Nathan Lynch via B4 Relay
2026-11-04  3:05   ` sashiko-bot
2026-11-13 17:29   ` Frank Li
2026-11-04  2:50 ` [PATCH v4 24/25] dmaengine: sdxi: MSI/MSI-X vector allocation and mapping Nathan Lynch via B4 Relay
2026-11-04  3:15   ` sashiko-bot
2026-11-13 17:30     ` Frank Li
2026-11-13 17:36   ` Frank Li
2026-11-04  2:50 ` [PATCH v4 25/25] dmaengine: sdxi: Add DMA engine provider Nathan Lynch via B4 Relay
2026-11-04  3:24   ` sashiko-bot
2026-11-13 17:50   ` Frank Li
2026-11-13 23:34     ` Lynch, Nathan
2026-11-30 18:46   ` Ravi Jonnalagadda
2026-11-30 18:29 ` [PATCH v4 00/25] dmaengine: Smart Data Accelerator Interface (SDXI) basic support Ravi Jonnalagadda
2026-11-30 23:21   ` Lynch, Nathan
2026-12-01 17:21     ` Ravi Jonnalagadda [this message]

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=20261201172147.90681-1-ravis.opensrc@gmail.com \
    --to=ravis.opensrc@gmail.com \
    --cc=Frank.Li@kernel.org \
    --cc=John.Kariuki@amd.com \
    --cc=PradeepVineshReddy.Kodamati@amd.com \
    --cc=Stephen.Bates@amd.com \
    --cc=bhelgaas@google.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=kinseyho@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=nathan.lynch@amd.com \
    --cc=rientjes@google.com \
    --cc=shivankg@amd.com \
    --cc=tycho@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wei.huang2@amd.com \
    --cc=weixugc@google.com \
    /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