Linux Trace Kernel
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Zhang Yuwei" <zhangyuwei20@huawei.com>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Trace I/O page fault response latency
Date: Wed, 25 Nov 2026 01:53:00 +0000	[thread overview]
Message-ID: <sashiko-outbox-232360@kernel.org> (raw)
In-Reply-To: <20261125013430.2144822-1-zhangyuwei20@huawei.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] docs: iommu: fix short title underline in
  Documentation/trace/iommu-iopf.rst
- [Low] iommu: missing iopf_trace_response() call in
  iopf_queue_remove_device()
--

commit 98dd7f9efb7c0639fc5bdb2729afb3491dcaf701
Author: Chen Jun <chenjun102@huawei.com>

iommu: Trace I/O page fault response latency

This commit adds the iommu:iopf_latency tracepoint to measure software
I/O page fault response latency from iommu_report_device_fault() until the
driver's page_response() callback returns, along with tracefs
documentation.

[ ... ]

> diff --git a/Documentation/trace/iommu-iopf.rst b/Documentation/trace/iommu-iopf.rst
> new file mode 100644
> index 0000000000000..259cf23c68992
> --- /dev/null
> +++ b/Documentation/trace/iommu-iopf.rst
> @@ -0,0 +1,52 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +IOMMU I/O page fault response latency
> +====================================

[Severity: Low]
The title underline is 36 "=" characters for a 37-character heading, which
causes Sphinx to emit a "Title underline too short" warning during
htmldocs builds.

[ ... ]

> diff --git a/drivers/iommu/io-pgfault.c b/drivers/iommu/io-pgfault.c
> index c16ff1fc4b95b..72e654ea5ffe9 100644
> --- a/drivers/iommu/io-pgfault.c
> +++ b/drivers/iommu/io-pgfault.c

[ ... ]

> @@ -334,6 +350,7 @@ void iopf_group_response(struct iopf_group *group,
>  
>  	mutex_lock(&fault_param->lock);
>  	ops->page_response(dev, &group->last_fault, &resp);
> +	iopf_trace_response(dev, iopf, &resp);
>  	list_del_init(&group->pending_node);
>  	mutex_unlock(&fault_param->lock);
>  }

[Severity: Low]
Should iopf_queue_remove_device() also call iopf_trace_response() after
ops->page_response()?

drivers/iommu/io-pgfault.c:iopf_queue_remove_device() {
    ...
	list_for_each_entry_safe(group, temp, &fault_param->faults, pending_node) {
		struct iopf_fault *iopf = &group->last_fault;
		struct iommu_page_response resp = {
			.pasid = iopf->fault.prm.pasid,
			.grpid = iopf->fault.prm.grpid,
			.code = IOMMU_PAGE_RESP_INVALID
		};

		ops->page_response(dev, iopf, &resp);
		list_del_init(&group->pending_node);
		iopf_free_group(group);
	}
    ...
}

When a device is removed from an IOPF queue while fault groups are still
pending on fault_param->faults (which already had
group->last_fault.report_time_ns populated by iopf_group_alloc()), those
groups are completed with IOMMU_PAGE_RESP_INVALID via ops->page_response()
without emitting the iopf_latency event.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125013430.2144822-1-zhangyuwei20@huawei.com?part=1

  reply	other threads:[~2026-11-25  1:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  1:34 [PATCH] iommu: Trace I/O page fault response latency Zhang Yuwei
2026-11-25  1:53 ` sashiko-bot [this message]
2026-11-25  2:00 ` Steven Rostedt

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=sashiko-outbox-232360@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zhangyuwei20@huawei.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