From: Nicolin Chen <nicolinc@nvidia.com>
To: Will Deacon <will@kernel.org>
Cc: Kuan-Wei Chiu <visitorckw@gmail.com>, <joro@8bytes.org>,
<akpm@linux-foundation.org>, <robin.murphy@arm.com>,
<cychu@google.com>, <hhchung@google.com>,
<amitamishra@google.com>, <marscheng@google.com>,
<linux-arm-kernel@lists.infradead.org>, <iommu@lists.linux.dev>,
<linux-kernel@vger.kernel.org>, <jserv@ccns.ncku.edu.tw>,
<eleanor15x@gmail.com>
Subject: Re: [PATCH 1/2] iommu/arm-smmu-v3: Replace sort_nonatomic() with sort()
Date: Sun, 2 Aug 2026 10:45:35 -0700 [thread overview]
Message-ID: <am+CPy4+gcGPtR3G@nvidia.com> (raw)
In-Reply-To: <am8MpGR14HAg58Gd@willie-the-truck>
On Sun, Aug 02, 2026 at 10:23:48AM +0100, Will Deacon wrote:
> On Thu, Jul 30, 2026 at 06:12:15PM +0000, Kuan-Wei Chiu wrote:
> > @@ -4047,9 +4047,9 @@ static int arm_smmu_insert_master(struct arm_smmu_device *smmu,
> > }
> >
> > /* Put the ids into order for sorted to_merge/to_unref arrays */
> > - sort_nonatomic(master->streams, master->num_streams,
> > - sizeof(master->streams[0]), arm_smmu_stream_id_cmp,
> > - NULL);
> > + sort(master->streams, master->num_streams,
> > + sizeof(master->streams[0]), arm_smmu_stream_id_cmp,
> > + NULL);
>
> Makes sense to me. Nicolin, did you choose the nonatomic version
> specifically?
It's probably rare to have a large multi-stream array, so I think
sort() would be fine.
Nicolin
next prev parent reply other threads:[~2026-08-02 17:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 18:12 [PATCH 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic() Kuan-Wei Chiu
2026-07-30 18:12 ` [PATCH 1/2] iommu/arm-smmu-v3: Replace sort_nonatomic() with sort() Kuan-Wei Chiu
2026-08-02 9:23 ` Will Deacon
2026-08-02 17:45 ` Nicolin Chen [this message]
2026-08-03 12:35 ` Robin Murphy
2026-08-03 13:37 ` Pranjal Shrivastava
2026-07-30 18:12 ` [PATCH 2/2] Revert "lib/sort.c: add _nonatomic() variants with cond_resched()" Kuan-Wei Chiu
2026-07-30 19:32 ` [PATCH 0/2] lib/sort: Clean up sort_nonatomic() and sort_r_nonatomic() Kuan-Wei Chiu
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=am+CPy4+gcGPtR3G@nvidia.com \
--to=nicolinc@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=amitamishra@google.com \
--cc=cychu@google.com \
--cc=eleanor15x@gmail.com \
--cc=hhchung@google.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marscheng@google.com \
--cc=robin.murphy@arm.com \
--cc=visitorckw@gmail.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