[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210303131726.7a8cb169@jacob-builder>
Date: Wed, 3 Mar 2021 13:17:26 -0800
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: Tejun Heo <tj@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Joerg Roedel <joro@...tes.org>,
Lu Baolu <baolu.lu@...ux.intel.com>,
David Woodhouse <dwmw2@...radead.org>,
iommu@...ts.linux-foundation.org, cgroups@...r.kernel.org,
Li Zefan <lizefan@...wei.com>,
Johannes Weiner <hannes@...xchg.org>,
Jean-Philippe Brucker <jean-philippe@...aro.com>,
Alex Williamson <alex.williamson@...hat.com>,
Eric Auger <eric.auger@...hat.com>,
Jason Gunthorpe <jgg@...dia.com>,
Jonathan Corbet <corbet@....net>,
Raj Ashok <ashok.raj@...el.com>,
"Tian, Kevin" <kevin.tian@...el.com>, Yi Liu <yi.l.liu@...el.com>,
Wu Hao <hao.wu@...el.com>, Dave Jiang <dave.jiang@...el.com>,
jacob.jun.pan@...ux.intel.com
Subject: Re: [RFC PATCH 15/18] cgroup: Introduce ioasids controller
Hi Tejun,
On Wed, 3 Mar 2021 10:44:28 -0500, Tejun Heo <tj@...nel.org> wrote:
> On Sat, Feb 27, 2021 at 02:01:23PM -0800, Jacob Pan wrote:
> > IOASIDs are used to associate DMA requests with virtual address spaces.
> > They are a system-wide limited resource made available to the userspace
> > applications. Let it be VMs or user-space device drivers.
> >
> > This RFC patch introduces a cgroup controller to address the following
> > problems:
> > 1. Some user applications exhaust all the available IOASIDs thus
> > depriving others of the same host.
> > 2. System admins need to provision VMs based on their needs for IOASIDs,
> > e.g. the number of VMs with assigned devices that perform DMA requests
> > with PASID.
>
> Please take a look at the proposed misc controller:
>
> http://lkml.kernel.org/r/20210302081705.1990283-2-vipinsh@google.com
>
> Would that fit your bill?
The interface definitely can be reused. But IOASID has a different behavior
in terms of migration and ownership checking. I guess SEV key IDs are not
tied to a process whereas IOASIDs are. Perhaps this can be solved by
adding
+ .can_attach = ioasids_can_attach,
+ .cancel_attach = ioasids_cancel_attach,
Let me give it a try and come back.
Thanks for the pointer.
Jacob
>
> Thanks.
>
Thanks,
Jacob
Powered by blists - more mailing lists