Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2137560pxf; Sat, 13 Mar 2021 08:56:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIFZBcCrZHbzHdWLwxNkJqaGdGqbaWpfd3KMOHrTkXhMR3D4txTSdxtrZEsVYik2WE0EOv X-Received: by 2002:a17:906:75a:: with SMTP id z26mr14687994ejb.22.1615654596464; Sat, 13 Mar 2021 08:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615654596; cv=none; d=google.com; s=arc-20160816; b=NnYZwCkroCalVTolCDEvqDoxEwpRYVQxmMeBTgkIXMXswnp0ToAvmZx8fsAHhz+qXy 1DN3r72iadXK7gZBgFJZMjtgzszh1vuO2V+Qt7JlGYcxo5qvOuvHTGK+KXLBQcWcy+VN 1/pMjZm0RKkx5PgRSTSfsGAc7MYybFZEJERQPXgnOblCSXq6RUl411haItKSEdkhTjXO exFSQj2ewTZdspN/0in+pGxL1/eJD7GNl/XH53REzYV6uDGbVIZW6xx+vovT5Xez6UlF 7kGtsIPkdntdJnjCfl7vpKjzDDE2QXqOYBVeluKY9WjqfXS1gMb9OVOYoRgZj3YSOgwM su8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:ironport-sdr:ironport-sdr; bh=AHx/O9A/ZeI4ZU2VhdUF/DD9SgxdOjnUbsB5qTfgv5Y=; b=lnB8yUK3Naeso6MeSq+kHI31nTSnU84WKyRmFQqQ+QcSNd8BquC+WnjakACBpqmRlN wDQprGUgVQCnby7BX1JyLXBQQSAkf+T+QhAMJAympH4LpT+fkqkxMdoO63ljqkNJwlJM e//2KxwpazpxYYg8wQ43Yx69Ulj5jmNIG83a9gz24lM7dmXCQmIAGCj425mvNw+d2gc4 Vl6/YNIlk4/8zj75WHYlEvtq7i5Q8e2JCAXZKqUQHvLtiYzRUuBkfC29BAr+2pMPfKUn 6nWiqc2QXYS6DGGmiMp4dg6Xpq23vBECa+v9g5euYPhisQHWkiqjUx4XGJqgewfEbX/G h2jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs25si6261065ejb.238.2021.03.13.08.56.13; Sat, 13 Mar 2021 08:56:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234098AbhCMQym (ORCPT + 99 others); Sat, 13 Mar 2021 11:54:42 -0500 Received: from mga09.intel.com ([134.134.136.24]:64049 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233635AbhCMQym (ORCPT ); Sat, 13 Mar 2021 11:54:42 -0500 IronPort-SDR: XHwBZlFY/Szwfaecu1Fnj9dy6hsWuALE4JNeTMJU8Nrmfr3cLuGNn6aCCzYzPJYZh/ZSxTiH0j hyufNr9HmLUA== X-IronPort-AV: E=McAfee;i="6000,8403,9922"; a="189040915" X-IronPort-AV: E=Sophos;i="5.81,245,1610438400"; d="scan'208";a="189040915" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2021 08:54:41 -0800 IronPort-SDR: q+dZ4Wdw1KWvvWQuaBlglJ3vdF/LGB5BBKjuN9QbvctfyF6y/4AbdDbUELjkR9dOXXCNvcfIBx p7xtDLTWeL8w== X-IronPort-AV: E=Sophos;i="5.81,245,1610438400"; d="scan'208";a="411366510" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2021 08:54:41 -0800 Date: Sat, 13 Mar 2021 08:57:01 -0800 From: Jacob Pan To: Tejun Heo Cc: Vipin Sharma , mkoutny@suse.com, rdunlap@infradead.org, thomas.lendacky@amd.com, brijesh.singh@amd.com, jon.grimm@amd.com, eric.vantassell@amd.com, pbonzini@redhat.com, hannes@cmpxchg.org, frankja@linux.ibm.com, borntraeger@de.ibm.com, corbet@lwn.net, seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, gingell@google.com, rientjes@google.com, dionnaglaze@google.com, kvm@vger.kernel.org, x86@kernel.org, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Tian, Kevin" , "Liu, Yi L" , "Raj, Ashok" , Alex Williamson , Jason Gunthorpe , Jacob Pan , "jean-philippe@linaro.org" , jacob.jun.pan@intel.com Subject: Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation. Message-ID: <20210313085701.1fd16a39@jacob-builder> In-Reply-To: References: <20210302081705.1990283-1-vipinsh@google.com> <20210302081705.1990283-3-vipinsh@google.com> <20210303185513.27e18fce@jacob-builder> <20210312125821.22d9bfca@jacob-builder> <20210312145904.4071a9d6@jacob-builder> Organization: OTC X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 destination/source cgroup in order enforce the > > limit. I am not an expert here, any feedback would be appreciated. > > That simply isn't a supported usage model. None of other resources will > get tracked if you do that. 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. I also didn't quite get the limitation on cgroup v2 migration, this is much simpler than memcg. Could you give me some pointers? BTW, since the IOASIDs are used to tag DMA and bound with guest process(mm) for shared virtual addressing. fork() cannot be supported, so I guess clone is not a solution here. Thanks, Jacob