[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190820094143.GA24154@infradead.org>
Date: Tue, 20 Aug 2019 02:41:43 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Tom Murphy <murphyt7@....ie>
Cc: iommu@...ts.linux-foundation.org, Heiko Stuebner <heiko@...ech.de>,
virtualization@...ts.linux-foundation.org,
linux-tegra@...r.kernel.org,
Thierry Reding <thierry.reding@...il.com>,
Will Deacon <will@...nel.org>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
linux-samsung-soc@...r.kernel.org,
Krzysztof Kozlowski <krzk@...nel.org>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-rockchip@...ts.infradead.org, Andy Gross <agross@...nel.org>,
Gerald Schaefer <gerald.schaefer@...ibm.com>,
linux-s390@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
Matthias Brugger <matthias.bgg@...il.com>,
linux-arm-kernel@...ts.infradead.org,
David Woodhouse <dwmw2@...radead.org>,
linux-kernel@...r.kernel.org, Kukjin Kim <kgene@...nel.org>,
Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH V5 1/5] iommu/amd: Remove unnecessary locking from AMD
iommu driver
On Thu, Aug 15, 2019 at 12:09:39PM +0100, Tom Murphy wrote:
> We can remove the mutex lock from amd_iommu_map and amd_iommu_unmap.
> iommu_map doesn’t lock while mapping and so no two calls should touch
> the same iova range. The AMD driver already handles the page table page
> allocations without locks so we can safely remove the locks.
I've been looking over the code and trying to understand how the
synchronization works. I gues we the cmpxchg64 in free_clear_pte
is the important point here? I have to admit I don't fully understand
the concurrency issues here, but neither do I understand what the
mutex you removed might have helped to start with.
Powered by blists - more mailing lists