From: Huang Jiaqing <jiaqing.huang@intel.com>
To: joro@8bytes.org, will@kernel.org, robin.murphy@arm.com,
dwmw2@infradead.org, baolu.lu@linux.intel.com,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Cc: jacob.jun.pan@linux.intel.com, kevin.tian@intel.com,
yi.y.sun@intel.com, kvm@vger.kernel.org, jiaqing.huang@intel.com
Subject: [PATCH 2/2] iommu/vt-d: Adopt new helper for looking up pci device
Date: Tue, 24 Oct 2023 01:41:24 -0700 [thread overview]
Message-ID: <20231024084124.11155-2-jiaqing.huang@intel.com> (raw)
In-Reply-To: <20231024084124.11155-1-jiaqing.huang@intel.com>
Adopt the new iopf_queue_find_pdev func() to look up PCI device
for better efficiency and avoid the CPU stuck issue with parallel
heavy dsa_test.
Signed-off-by: Huang Jiaqing <jiaqing.huang@intel.com>
---
drivers/iommu/intel/svm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index 659de9c16024..0f1018b76557 100644
--- a/drivers/iommu/intel/svm.c
+++ b/drivers/iommu/intel/svm.c
@@ -672,7 +672,7 @@ static irqreturn_t prq_event_thread(int irq, void *d)
if (unlikely(req->lpig && !req->rd_req && !req->wr_req))
goto prq_advance;
- pdev = pci_get_domain_bus_and_slot(iommu->segment,
+ pdev = iopf_queue_find_pdev(iommu->iopf_queue,
PCI_BUS_NUM(req->rid),
req->rid & 0xff);
/*
@@ -688,7 +688,6 @@ static irqreturn_t prq_event_thread(int irq, void *d)
trace_prq_report(iommu, &pdev->dev, req->qw_0, req->qw_1,
req->priv_data[0], req->priv_data[1],
iommu->prq_seq_number++);
- pci_dev_put(pdev);
prq_advance:
head = (head + sizeof(*req)) & PRQ_RING_MASK;
}
--
2.31.1
next prev parent reply other threads:[~2023-10-24 8:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 8:41 [PATCH 1/2] iommu: Introduce a rb_tree for looking up device Huang Jiaqing
2023-10-24 8:41 ` Huang Jiaqing [this message]
2023-10-24 12:01 ` [PATCH 2/2] iommu/vt-d: Adopt new helper for looking up pci device Baolu Lu
2023-10-27 6:08 ` Huang, Jiaqing
2023-10-24 11:58 ` [PATCH 1/2] iommu: Introduce a rb_tree for looking up device Baolu Lu
2023-10-27 6:09 ` Huang, Jiaqing
2023-10-24 12:38 ` Robin Murphy
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=20231024084124.11155-2-jiaqing.huang@intel.com \
--to=jiaqing.huang@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=jacob.jun.pan@linux.intel.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yi.y.sun@intel.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