Re: [PATCH] iommu: Trace I/O page fault response latency
From: Steven Rostedt
Date: Tue Nov 24 2026 - 21:00:30 EST
On Wed, 25 Nov 2026 09:34:30 +0800
Zhang Yuwei <zhangyuwei20@xxxxxxxxxx> wrote:
> @@ -155,6 +159,14 @@ static struct iommu_attach_handle *find_fault_handler(struct device *dev,
> return attach_handle;
> }
>
> +static void iopf_trace_response(struct device *dev, const struct iopf_fault *evt,
> + const struct iommu_page_response *resp)
> +{
> + if (trace_iopf_latency_enabled() && evt->report_time_ns)
> + trace_iopf_latency(dev, evt, resp,
> + ktime_get_ns() - evt->report_time_ns);
Please use:
trace_call__iopf_latency(dev, evt, resp,
ktime_get_ns() - evt->report_time_ns);
As the trace_iopf_latency_enabled() already does check if the event is
enabled. Using the trace_call__ variant will always call the hooks
without adding another static branch.
-- Steve
> +}
> +