From: Will Deacon <will@kernel.org>
To: Jacob Pan <jacob.pan@linux.microsoft.com>
Cc: linux-kernel@vger.kernel.org,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
Joerg Roedel <joro@8bytes.org>,
Mostafa Saleh <smostafa@google.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Robin Murphy <robin.murphy@arm.com>,
Nicolin Chen <nicolinc@nvidia.com>,
Zhang Yu <zhangyu1@linux.microsoft.com>,
Jean Philippe-Brucker <jean-philippe@linaro.org>,
Alexander Grest <Alexander.Grest@microsoft.com>
Subject: Re: [PATCH v5 2/3] iommu/arm-smmu-v3: Fix CMDQ timeout warning
Date: Wed, 10 Dec 2025 12:16:19 +0900 [thread overview]
Message-ID: <aTjmA_juSss36e8v@google.com> (raw)
In-Reply-To: <20251208212857.13101-3-jacob.pan@linux.microsoft.com>
On Mon, Dec 08, 2025 at 01:28:56PM -0800, Jacob Pan wrote:
> @@ -781,12 +771,21 @@ static int arm_smmu_cmdq_issue_cmdlist(struct arm_smmu_device *smmu,
> local_irq_save(flags);
> llq.val = READ_ONCE(cmdq->q.llq.val);
> do {
> + struct arm_smmu_queue_poll qp;
> u64 old;
>
> + /*
> + * Poll without WFE because:
> + * 1) Running out of space should be rare. Power saving is not
> + * an issue.
> + * 2) WFE depends on queue full break events, which occur only
> + * when the queue is full, but here we’re polling for
> + * sufficient space, not just queue full condition.
> + */
I don't think this is reasonable; we should be able to use wfe instead of
polling on hardware that supports it and that is an important power-saving
measure in mobile parts.
If this is really an issue, we could take a spinlock around the
command-queue allocation loop for hardware with small queue sizes relative
to the number of CPUs, but it's not clear to me that we need to do anything
at all. I'm happy with the locking change in patch 3.
If we apply _only_ the locking change in the next patch, does that solve the
reported problem for you?
Will
next prev parent reply other threads:[~2025-12-10 3:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 21:28 [PATCH v5 0/3] SMMU v3 CMDQ fix and improvement Jacob Pan
2025-12-08 21:28 ` [PATCH v5 1/3] iommu/arm-smmu-v3: Parameterize wfe for CMDQ polling Jacob Pan
2025-12-08 21:28 ` [PATCH v5 2/3] iommu/arm-smmu-v3: Fix CMDQ timeout warning Jacob Pan
2025-12-10 3:16 ` Will Deacon [this message]
2025-12-12 20:05 ` Jacob Pan
2025-12-08 21:28 ` [PATCH v5 3/3] iommu/arm-smmu-v3: Improve CMDQ lock fairness and efficiency Jacob Pan
2026-01-05 22:58 ` [PATCH v5 0/3] SMMU v3 CMDQ fix and improvement 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=aTjmA_juSss36e8v@google.com \
--to=will@kernel.org \
--cc=Alexander.Grest@microsoft.com \
--cc=iommu@lists.linux.dev \
--cc=jacob.pan@linux.microsoft.com \
--cc=jean-philippe@linaro.org \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=smostafa@google.com \
--cc=zhangyu1@linux.microsoft.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