From: Peng Zhang <zhangpeng.00@bytedance.com>
To: John Garry <john.garry@huawei.com>, joro@8bytes.org, will@kernel.org
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
robin.murphy@arm.com, xieyongji@bytedance.com,
Ethan Zhao <haifeng.zhao@linux.intel.com>
Subject: Re: [PATCH v2] iommu/iova: Optimize alloc_iova with rbtree_augmented
Date: Fri, 2 Sep 2022 11:30:53 +0800 [thread overview]
Message-ID: <4a62a93c-683a-0515-2033-26c59b3b6f20@bytedance.com> (raw)
In-Reply-To: <1351998d-4fd7-dffb-c1fa-a0b1ca759123@huawei.com>
> If you really have a performance issue with alloc_iova_fast() ->
> alloc_iova() then I suggest that you consider trying to use
> dma_opt_mapping_size() to teach the DMA engine driver to not create
> requests whose overall size exceeds to the rcache limit.
Yes. But I don't think it essentially solves the problem.
A library for users should run stably ant it shouldn't hold
the spinlock for a long time in some cases. It can even be
said to be a bug.
Like this:
[Wed May 25 05:27:59 2022] watchdog: BUG: soft lockup - CPU#58
stuck for 23s!
[Wed May 25 05:27:59 2022] Call Trace:
[Wed May 25 05:27:59 2022] alloc_iova+0xf2/0x140
[Wed May 25 05:27:59 2022] alloc_iova_fast+0x56/0x251
Now we avoid this problem with iommu=pt, but it didn't solve the problem.
Thanks,
Peng
next prev parent reply other threads:[~2022-09-02 3:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 9:51 [PATCH v2] iommu/iova: Optimize alloc_iova with rbtree_augmented Peng Zhang
2022-08-24 12:30 ` Ethan Zhao
2022-08-25 8:10 ` [External] " Peng Zhang
2022-08-26 8:58 ` Ethan Zhao
2022-08-26 10:28 ` Peng Zhang
2022-09-01 10:45 ` John Garry
2022-09-02 3:30 ` Peng Zhang [this message]
2022-09-21 1:15 ` wangjie (L)
2022-09-21 3:55 ` Peng Zhang
2022-09-21 10:54 ` wangjie (L)
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=4a62a93c-683a-0515-2033-26c59b3b6f20@bytedance.com \
--to=zhangpeng.00@bytedance.com \
--cc=haifeng.zhao@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=john.garry@huawei.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=xieyongji@bytedance.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;
as well as URLs for NNTP newsgroup(s).