Linux IOMMU Development
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: John Garry <john.garry@huawei.com>,
	joro@8bytes.org, will@kernel.org, robin.murphy@arm.com
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	linuxarm@huawei.com
Subject: Re: [PATCH v3 0/7] iommu: Allow IOVA rcache range be configured
Date: Wed, 2 Jun 2021 12:37:20 +0800	[thread overview]
Message-ID: <834ad35a-7310-1738-7d17-7c061ca73e4c@linux.intel.com> (raw)
In-Reply-To: <1622557781-211697-1-git-send-email-john.garry@huawei.com>

On 6/1/21 10:29 PM, John Garry wrote:
> For streaming DMA mappings involving an IOMMU and whose IOVA len regularly
> exceeds the IOVA rcache upper limit (meaning that they are not cached),
> performance can be reduced.
> 
> This is much more pronounced from commit 4e89dce72521 ("iommu/iova: Retry
> from last rb tree node if iova search fails"), as discussed at [0].
> 
> IOVAs which cannot be cached are highly involved in the IOVA ageing issue,
> as discussed at [1].
> 
> This series allows the IOVA rcache range be configured, so that we may
> cache all IOVAs per domain, thus improving performance.
> 
> A new IOMMU group sysfs file is added - max_opt_dma_size - which is used
> indirectly to configure the IOVA rcache range:
> /sys/kernel/iommu_groups/X/max_opt_dma_size
> 
> This file is updated same as how the IOMMU group default domain type is
> updated, i.e. must unbind the only device in the group first.

Could you explain why it requires singleton group and driver unbinding
if the user only wants to increase the upper limit? I haven't dived into
the details yet, sorry if this is a silly question.

Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2021-06-02  4:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 14:29 [PATCH v3 0/7] iommu: Allow IOVA rcache range be configured John Garry
2021-06-01 14:29 ` [PATCH v3 1/7] iommu: Reactor iommu_group_store_type() John Garry
2021-06-01 14:29 ` [PATCH v3 2/7] iova: Allow rcache range upper limit to be flexible John Garry
2021-06-01 14:29 ` [PATCH v3 3/7] iommu: Allow iommu_change_dev_def_domain() realloc default domain for same type John Garry
2021-06-01 14:29 ` [PATCH v3 4/7] iova: Add iova_domain_len_is_cached() John Garry
2021-06-01 14:29 ` [PATCH v3 5/7] iova: Add init_iova_domain_ext() John Garry
2021-06-01 14:29 ` [PATCH v3 6/7] iommu: Allow max opt DMA len be set for a group via sysfs John Garry
2021-06-01 14:29 ` [PATCH v3 7/7] dma-iommu: Use init_iova_domain_ext() for IOVA domain init John Garry
2021-06-02  4:37 ` Lu Baolu [this message]
2021-06-02  7:48   ` [PATCH v3 0/7] iommu: Allow IOVA rcache range be configured John Garry
2021-06-03  0:39     ` Lu Baolu
2021-06-03  8:00       ` John Garry

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=834ad35a-7310-1738-7d17-7c061ca73e4c@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=john.garry@huawei.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.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