[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230213154345.0f76eea1@jacob-builder>
Date: Mon, 13 Feb 2023 15:43:45 -0800
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Jean-Philippe Brucker <jean-philippe@...aro.org>,
LKML <linux-kernel@...r.kernel.org>, iommu@...ts.linux.dev,
Lu Baolu <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>,
Jean-Philippe Brucker <jean-philippe@...aro.com>,
Robin Murphy <robin.murphy@....com>,
David Woodhouse <dwmw2@...radead.org>,
Raj Ashok <ashok.raj@...el.com>,
"Tian, Kevin" <kevin.tian@...el.com>, Yi Liu <yi.l.liu@...el.com>,
jacob.jun.pan@...ux.intel.com
Subject: Re: [PATCH 2/2] iommu/ioasid: Remove custom IOASID allocator
Hi Jason,
On Mon, 13 Feb 2023 19:18:51 -0400, Jason Gunthorpe <jgg@...dia.com> wrote:
> On Mon, Feb 13, 2023 at 01:44:02PM -0800, Jacob Pan wrote:
> > > Your DMA API PASID thing will simply need one new API to alloc/free a
> > > PASID from the iommu_global_pasid_ida
> > It should satisfy what we need right now.
> > Just wondering if we were to do resource management of global PASIDs,
> > say with the new misc cgroup controller, do we plan to expand in iommu
> > sva code? If yes, do we keep DMA API PASID in a separate range/set?
>
> I would say all shared PASIDs held by userspace should be captured by
> by a resource limit, it doesn't matter if they are global PASIDs or
> device local shared PASIDs.
agreed, I was just thinking in-kernel DMA PASID is not held by userspace,
might be good to keep them in separate pool, thus keeping ioasid_set.
> So if a cgroup comes it is just a matter of putting charges in the
> right place which is auditable by looking at calls to attach pasid
> functions.
shouldn't we charge cg during allocation? Or it might be too early for
iommufd so we have to wait until attach?
Thanks,
Jacob
Powered by blists - more mailing lists