[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7ba57474-57ad-4c81-bb50-4e0c6e3be633@amd.com>
Date: Tue, 2 Dec 2025 10:44:55 +0530
From: Vasant Hegde <vasant.hegde@....com>
To: Ankit Soni <Ankit.Soni@....com>, iommu@...ts.linux.dev
Cc: suravee.suthikulpanit@....com, joro@...tes.org, will@...nel.org,
robin.murphy@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/amd: move wait_on_sem() out of spinlock
On 12/1/2025 8:09 PM, Ankit Soni wrote:
> With iommu.strict=1, the existing completion wait path can cause soft
> lockups under stressed environment, as wait_on_sem() busy-waits under the
> spinlock with interrupts disabled.
>
> Move the completion wait in iommu_completion_wait() out of the spinlock.
> wait_on_sem() only polls the hardware-updated cmd_sem and does not require
> iommu->lock, so holding the lock during the busy wait unnecessarily
> increases contention and extends the time with interrupts disabled.
>
> Signed-off-by: Ankit Soni <Ankit.Soni@....com>
Reviewed-by: Vasant Hegde <vasant.hegde@....com>
-Vasant
Powered by blists - more mailing lists