[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+CK2bBGHv3f2AM999C5zoo018yzFdQpygUaPn0AVoJ7cX+Sbg@mail.gmail.com>
Date: Tue, 26 Dec 2023 12:14:35 -0500
From: Pasha Tatashin <pasha.tatashin@...een.com>
To: "Liu, Jingqi" <jingqi.liu@...el.com>
Cc: David Rientjes <rientjes@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>,
alim.akhtar@...sung.com, alyssa@...enzweig.io, asahi@...ts.linux.dev,
baolu.lu@...ux.intel.com, bhelgaas@...gle.com, cgroups@...r.kernel.org,
corbet@....net, david@...hat.com, dwmw2@...radead.org, hannes@...xchg.org,
heiko@...ech.de, iommu@...ts.linux.dev, jernej.skrabec@...il.com,
jonathanh@...dia.com, joro@...tes.org, krzysztof.kozlowski@...aro.org,
linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-rockchip@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
linux-sunxi@...ts.linux.dev, linux-tegra@...r.kernel.org,
lizefan.x@...edance.com, marcan@...can.st, mhiramat@...nel.org,
m.szyprowski@...sung.com, paulmck@...nel.org, rdunlap@...radead.org,
robin.murphy@....com, samuel@...lland.org, suravee.suthikulpanit@....com,
sven@...npeter.dev, thierry.reding@...il.com, tj@...nel.org,
tomas.mudrunka@...il.com, vdumpa@...dia.com, wens@...e.org, will@...nel.org,
yu-cheng.yu@...el.com
Subject: Re: [PATCH v2 01/10] iommu/vt-d: add wrapper functions for page allocations
> >> Document the locking requirements for this?
> >
> > Thank you for the review. I will add info about locking requirements,
> > in fact they are very relaxed.
> >
> > These pages are added to the list by unmaps or remaps operation in
> > Intel IOMMU implementation. These calls assume that whoever is doing
> > those operations has exclusive access to the VA range in the page
> > table of that operation. The pages in this freelist only belong to the
> > former page-tables from the IOVA range for those operations.
>
> These pages maybe be accessed concurrently by thread contexts other than
> the IOMMU driver (such as debugfs).
Good point regarding debugfs. While, it does not change any locking
assumptions, for this series. It might change some design decisions
that we need to make when freeing pages on unmaps (a separate RFC
series that I sent). I will have to study how debugfs affect refcnt
and mapcount, and whether we could use per-page page table locking if
needed.
Thanks,
Pasha
Powered by blists - more mailing lists