[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56cc2e4e-81dd-f2d2-f690-6d82217b9e7d@intel.com>
Date: Tue, 26 Sep 2023 16:25:26 +0800
From: "Huang, Jiaqing" <jiaqing.huang@...el.com>
To: Joerg Roedel <joro@...tes.org>
Cc: kvm@...r.kernel.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, will@...nel.org,
robin.murphy@....com, kevin.tian@...el.com,
baolu.lu@...ux.intel.com, jacob.jun.pan@...ux.intel.com,
yi.l.liu@...el.com, yi.y.sun@...el.com
Subject: Re: [PATCH] iommu/vt-d: Introduce a rb_tree for looking up device
On 9/25/2023 4:12 PM, Joerg Roedel wrote:
> On Mon, Aug 21, 2023 at 12:16:59AM -0700, Huang Jiaqing wrote:
>> The existing IO page fault handler locates the PCI device by calling
>> pci_get_domain_bus_and_slot(), which searches the list of all PCI
>> devices until the desired PCI device is found. This is inefficient
>> because the algorithm efficiency of searching a list is O(n). In the
>> critical path of handling an IO page fault, this can cause a significant
>> performance bottleneck.
> Can you elaborate a little more on the 'significant performance
> bottleneck' part? Where do you see this as a problem?
>
> Regards,
>
> Joerg
While lots of dsa devices were enabled, parallel dsa_test with large
transfer size
would be executed ineffciently and cause cpu stuck in
pci_get_domain_bus_and_slot
by lock competition. The introduced patch could significantly improve
the speed and
prevent the CPU from getting sutck. It maybe confusing for "significant
performance
bottleneck" since it didn't benefit all the cases, would rephase it in
the new patch. Thanks!
BRs,
Jiaqing
Powered by blists - more mailing lists