Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-16 Thread Jacob Pan
Hi Tejun, On Mon, 15 Mar 2021 22:22:12 -0400, Tejun Heo wrote: > On Mon, Mar 15, 2021 at 06:30:30PM -0700, Jacob Pan wrote: > > I don't know if this is required. I thought utilities such as cgclassify > > need to be supported. > > " cgclassify - move running task(s) to given cgroups " > > If no

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-15 Thread Tejun Heo
On Mon, Mar 15, 2021 at 06:30:30PM -0700, Jacob Pan wrote: > I don't know if this is required. I thought utilities such as cgclassify > need to be supported. > " cgclassify - move running task(s) to given cgroups " > If no such use case, I am fine with dropping the migration support. Just > enforce

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-15 Thread Jacob Pan
Hi Tejun, On Mon, 15 Mar 2021 19:54:36 -0400, Tejun Heo wrote: > Hello, > > On Mon, Mar 15, 2021 at 04:40:12PM -0700, Jacob Pan wrote: > > 2. then we want to move/migrate Process1 to cg_B. so we need uncharge > > 10 of cg_A, charge 10 of cg_B > > So, what I don't get is why this migration is

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-15 Thread Tejun Heo
Hello, On Mon, Mar 15, 2021 at 04:40:12PM -0700, Jacob Pan wrote: > 2. then we want to move/migrate Process1 to cg_B. so we need uncharge 10 of > cg_A, charge 10 of cg_B So, what I don't get is why this migration is necessary. This isn't supported as a usage pattern and no one, at least in terms

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-15 Thread Jacob Pan
Hi Tejun, On Mon, 15 Mar 2021 18:19:35 -0400, Tejun Heo wrote: > Hello, > > On Mon, Mar 15, 2021 at 03:11:55PM -0700, Jacob Pan wrote: > > > Migration itself doesn't have restrictions but all resources are > > > distributed on the same hierarchy, so the controllers are supposed to > > > follow

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-15 Thread Tejun Heo
Hello, On Mon, Mar 15, 2021 at 03:11:55PM -0700, Jacob Pan wrote: > > Migration itself doesn't have restrictions but all resources are > > distributed on the same hierarchy, so the controllers are supposed to > > follow the same conventions that can be implemented by all controllers. > > > Got it

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-15 Thread Jacob Pan
Hi Tejun, On Sat, 13 Mar 2021 13:05:36 -0500, Tejun Heo wrote: > Hello, > > On Sat, Mar 13, 2021 at 08:57:01AM -0800, Jacob Pan wrote: > > Isn't PIDs controller doing the charge/uncharge? I was under the > > impression that each resource can be independently charged/uncharged, > > why it affect

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-13 Thread Tejun Heo
Hello, On Sat, Mar 13, 2021 at 08:57:01AM -0800, Jacob Pan wrote: > Isn't PIDs controller doing the charge/uncharge? I was under the impression > that each resource can be independently charged/uncharged, why it affects > other resources? Sorry for the basic question. Yeah, PID is an exception as

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-13 Thread Jacob Pan
Hi Tejun, On Sat, 13 Mar 2021 05:20:39 -0500, Tejun Heo wrote: > On Fri, Mar 12, 2021 at 02:59:04PM -0800, Jacob Pan wrote: > > Our primary goal is to limit the amount of IOASIDs that VMs can > > allocate. If a VM is migrated to a different cgroup, I think we need to > > charge/uncharge the dest

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-13 Thread Tejun Heo
On Fri, Mar 12, 2021 at 02:59:04PM -0800, Jacob Pan wrote: > Our primary goal is to limit the amount of IOASIDs that VMs can allocate. > If a VM is migrated to a different cgroup, I think we need to > charge/uncharge the destination/source cgroup in order enforce the limit. I > am not an expert her

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-12 Thread Jacob Pan
Hi Vipin, On Fri, 12 Mar 2021 13:15:14 -0800, Vipin Sharma wrote: > On Fri, Mar 12, 2021 at 12:58:21PM -0800, Jacob Pan wrote: > > Hi Vipin & Tejun, > > > > Sorry for the late reply, I sent from a different email address than I > > intended. Please see my comments inline. > > > > > > On Thu,

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-12 Thread Vipin Sharma
On Fri, Mar 12, 2021 at 12:58:21PM -0800, Jacob Pan wrote: > Hi Vipin & Tejun, > > Sorry for the late reply, I sent from a different email address than I > intended. Please see my comments inline. > > > On Thu, 4 Mar 2021 03:51:16 -0500, Tejun Heo wrote: > > > Hello, > > > > On Wed, Mar 03, 2

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-12 Thread Jacob Pan
Hi Vipin & Tejun, Sorry for the late reply, I sent from a different email address than I intended. Please see my comments inline. On Thu, 4 Mar 2021 03:51:16 -0500, Tejun Heo wrote: > Hello, > > On Wed, Mar 03, 2021 at 10:22:03PM -0800, Vipin Sharma wrote: > > > I am trying to see if IOASIDs

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-04 Thread Tejun Heo
Hello, On Wed, Mar 03, 2021 at 10:22:03PM -0800, Vipin Sharma wrote: > > I am trying to see if IOASIDs cgroup can also fit in this misc controller > > as yet another resource type. > > https://lore.kernel.org/linux-iommu/20210303131726.7a8cb169@jacob-builder/T/#u > > However, unlike sev IOASIDs ne

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-03 Thread Vipin Sharma
On Wed, Mar 03, 2021 at 06:55:13PM -0800, Jacob Pan wrote: > Hi Vipin, > > On Tue, 2 Mar 2021 00:17:05 -0800, Vipin Sharma wrote: > > > +Migration and Ownership > > +~~~ > > + > > +A miscellaneous scalar resource is charged to the cgroup in which it is > > used +first, and s

Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-03 Thread Jacob Pan
Hi Vipin, On Tue, 2 Mar 2021 00:17:05 -0800, Vipin Sharma wrote: > +Migration and Ownership > +~~~ > + > +A miscellaneous scalar resource is charged to the cgroup in which it is > used +first, and stays charged to that cgroup until that resource is > freed. Migrating +a proc

[RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation.

2021-03-02 Thread Vipin Sharma
Documentation of miscellaneous cgroup controller. This new controller is used to track and limit the usage of scalar resources. Signed-off-by: Vipin Sharma Reviewed-by: David Rientjes --- Documentation/admin-guide/cgroup-v1/index.rst | 1 + Documentation/admin-guide/cgroup-v1/misc.rst | 4 ++