From: Guorui Yu <GuoRui.Yu@linux.alibaba.com>
To: kernel test robot <lkp@intel.com>, hch@lst.de, m.szyprowski@samsung.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
robin.murphy@arm.com, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org, xiaokang.hxk@alibaba-inc.com
Subject: Re: [PATCH] swiotlb: fix the deadlock in swiotlb_do_find_slots
Date: Mon, 13 Feb 2023 17:35:47 +0800 [thread overview]
Message-ID: <36c2bc37-714b-2251-942f-1d02f4b77d5a@linux.alibaba.com> (raw)
In-Reply-To: <202302131748.pa5NGbb9-lkp@intel.com>
在 2023/2/13 17:28, kernel test robot 写道:
> Hi GuoRui.Yu",
>
> Thank you for the patch! Perhaps something to improve:
>
> 654 spin_lock_irqsave(&area->lock, flags);
> 655 if (unlikely(nslots > mem->area_nslabs - area->used))
> 656 goto not_found;
> 657
> 658 slot_base = area_index * mem->area_nslabs;
> 659 index = wrap = wrap_area_index(mem, ALIGN(area->index, stride));
index_nowrap should be initialized to "index" here, and I will add this
in v2.
I have done some stress tests locally to check if they can avoid the
deadlock but they did not reveal this problem, I will pay more attention
next time.
> 660
> 661 do {
Guorui
next prev parent reply other threads:[~2023-02-13 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 6:36 GuoRui.Yu
2023-02-13 9:28 ` kernel test robot
2023-02-13 9:28 ` kernel test robot
2023-02-13 9:35 ` Guorui Yu [this message]
2023-02-22 16:52 GuoRui.Yu
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=36c2bc37-714b-2251-942f-1d02f4b77d5a@linux.alibaba.com \
--to=guorui.yu@linux.alibaba.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=m.szyprowski@samsung.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=xiaokang.hxk@alibaba-inc.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
all inboxes | Powered by JetHome®