From: Will Deacon <will@kernel.org>
To: John Garry <john.garry@huawei.com>
Cc: jean-philippe@linaro.org, mst@redhat.com, joro@8bytes.org,
chenxiang66@hisilicon.com, linuxarm@huawei.com,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
iommu@lists.linux-foundation.org, thunder.leizhen@huawei.com,
robin.murphy@arm.com
Subject: Re: [PATCH RESEND v5 2/5] iova: Allow rcache range upper limit to be flexible
Date: Wed, 6 Jul 2022 13:10:58 +0100 [thread overview]
Message-ID: <20220706121057.GF2403@willie-the-truck> (raw)
In-Reply-To: <1649071634-188535-3-git-send-email-john.garry@huawei.com>
On Mon, Apr 04, 2022 at 07:27:11PM +0800, John Garry wrote:
> Some low-level drivers may request DMA mappings whose IOVA length exceeds
> that of the current rcache upper limit.
>
> This means that allocations for those IOVAs will never be cached, and
> always must be allocated and freed from the RB tree per DMA mapping cycle.
> This has a significant effect on performance, more so since commit
> 4e89dce72521 ("iommu/iova: Retry from last rb tree node if iova search
> fails"), as discussed at [0].
>
> As a first step towards allowing the rcache range upper limit be
> configured, hold this value in the IOVA rcache structure, and allocate
> the rcaches separately.
>
> Delete macro IOVA_RANGE_CACHE_MAX_SIZE in case it's reused by mistake.
>
> [0] https://lore.kernel.org/linux-iommu/20210129092120.1482-1-thunder.leizhen@huawei.com/
>
> Signed-off-by: John Garry <john.garry@huawei.com>
> ---
> drivers/iommu/iova.c | 20 ++++++++++----------
> include/linux/iova.h | 3 +++
> 2 files changed, 13 insertions(+), 10 deletions(-)
Acked-by: Will Deacon <will@kernel.org>
Will
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-07-06 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1649071634-188535-1-git-send-email-john.garry@huawei.com>
[not found] ` <1649071634-188535-2-git-send-email-john.garry@huawei.com>
2022-07-06 12:00 ` [PATCH RESEND v5 1/5] iommu: Refactor iommu_group_store_type() Will Deacon
[not found] ` <5ab934ff-0b16-0b55-e0f1-36366cd33e84@huawei.com>
2022-07-06 12:12 ` Will Deacon
[not found] ` <1649071634-188535-3-git-send-email-john.garry@huawei.com>
2022-07-06 12:10 ` Will Deacon [this message]
[not found] ` <834447a0-675a-5978-8ffe-285ce09f4213@huawei.com>
2022-07-06 12:11 ` [PATCH RESEND v5 2/5] iova: Allow rcache range upper limit to be flexible Will Deacon
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=20220706121057.GF2403@willie-the-truck \
--to=will@kernel.org \
--cc=chenxiang66@hisilicon.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.org \
--cc=john.garry@huawei.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mst@redhat.com \
--cc=robin.murphy@arm.com \
--cc=thunder.leizhen@huawei.com \
--cc=virtualization@lists.linux-foundation.org \
/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