Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1582752pxf; Fri, 12 Mar 2021 13:19:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyV+g8lZWKnwalZqJmPvY8iszfe2BXYpnLW6amT4J52TxpU2aICPku519k0fpJtat/i4/yj X-Received: by 2002:a05:6402:110b:: with SMTP id u11mr17088181edv.356.1615583966333; Fri, 12 Mar 2021 13:19:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615583966; cv=none; d=google.com; s=arc-20160816; b=FfQ+GilCu+Rb1wef/6MxyPzhMcd//GEo1ismrqeFifmV3+nE1i0aOY9gkD9dwZyv3k OfmrTxfJtyisMN0onUyn2zmMF/Fs1LnrABKso+q0ROsHadGQFvIJWkGgwwXP83zppZ1S OmiNPoGCag6dnpkl/avgjHmaXIaQJK9olDcH/zyhzgVXIRUbplhOsFKmxayVNEjDRD7U ImjPVZ/+zpw0+B2IHHxO40/FxuudsCqadz1I2Eda3+dcT6tI0ZUMMnp+HvYYBY1OUVbo Ci0zmQRS7FfSUjMhy0488Addi6ztBEA8zCXK4+xerrT57CoLLFMftYgvUI25PCu2uSi8 itXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oK13NYYObq7fILet15UhnXXbfKNqEk2c8gMn7wJFCws=; b=UfaRaLkcuvf5PqLsEgJ+rTKzH3muEr6d/Nn7EXfWKknlvStzNqxHzeG0ByJ8ge45Zj fTci9cylD0z+JnIXHXYUxwAjZYKwMbI5d4PtzBavuKnl/AwxQKxXKRgUP9UbYCN+i9Qp 2Iz2lqoN4f65trM4LdmyLDKi6QOjHBFkQxwMlZZO+jNUQPEOEiNT8+ooa/oB39HCRUr0 orPHL1Po90utlEiQ4Vtrc+OvYmV5ouOD13/aV1qaE+kUhhy4IFBYBtbQ1P1jlbC1O8no Asw49ZGJr3TswVxnSoeacscTc48QwSdWo6HzpQQZDHUlHX8VwvbjWfey5Hinn048cAYG h2zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="L/HGcpka"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gs18si5279857ejb.648.2021.03.12.13.19.03; Fri, 12 Mar 2021 13:19:26 -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; dkim=pass header.i=@google.com header.s=20161025 header.b="L/HGcpka"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235221AbhCLVPm (ORCPT + 99 others); Fri, 12 Mar 2021 16:15:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235219AbhCLVPU (ORCPT ); Fri, 12 Mar 2021 16:15:20 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D209FC061761 for ; Fri, 12 Mar 2021 13:15:19 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id y67so2727503pfb.2 for ; Fri, 12 Mar 2021 13:15:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oK13NYYObq7fILet15UhnXXbfKNqEk2c8gMn7wJFCws=; b=L/HGcpkaoKR032Ed2ki/P9yv8JigIq1I+XKxVu7Ofi15Aw2uLnI9zseSnLb0HbWpkJ XkKtQeqG9NJjlGQ3Otgauzs6NMkxAh5sXneh2ZGDisPS4wAjGaeShvuHapM+QQabnPka vu0eFLci/ShYfmigzoVRXjHbKBTqk5P9e8yqvJscm/GaYakLFEBiyZflNAVYu/bwWREf LnmFkwJssPewJhlPRqeAwa6abZP9J/hSgZfwMws0IFJ4aeNXd3ppUL+NEJbI9rue7qsR vzGEQ1dTDt71MLv5xsaf5NAQ95F0lgx0IcGUFb7eS+E2XTlXxk7gOi7ypjpkVfjbiA6I mNpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oK13NYYObq7fILet15UhnXXbfKNqEk2c8gMn7wJFCws=; b=pt26KxVEtv4ZnHAk6mIrBq89HqBV9HqdNJCqRrb8bBunzl0zVBpV2prPmAYNS4mFcl RX45YfmEs40t7dXWhdM3MDMyA4BlRBi0NPSqgKUCVew0Nxk05Z35em3U7p55Ux2dUNWF Wdbx/pBhKqRWp4+AHl78QaLmNMtkXEkUFx9dvLhcCuVN6sX27tHgvMv9S1f3na5h/JOr CXQDjmy16JNLsWqiIVp701VpfA3y/gFOWXP52UMjNdbdiuP/2MSn5PzNUceujNpb+YBB d5hJHFVg700Uv8hodMexXcPaFuJ1sxKRNLE37fSA2e/QsLJjF33GAluoMuJQ3oYFghyj K0AA== X-Gm-Message-State: AOAM53361uHdZooi78PSTg0n5s+IQI2GssH4+JSZxXLA2yvaBKTpFBzI YpCWUMxuC54Wj+noIt8obnbntQ== X-Received: by 2002:a62:b416:0:b029:1e4:fb5a:55bb with SMTP id h22-20020a62b4160000b02901e4fb5a55bbmr80217pfn.80.1615583719066; Fri, 12 Mar 2021 13:15:19 -0800 (PST) Received: from google.com ([2620:0:1008:10:18a1:1d64:e35b:961e]) by smtp.gmail.com with ESMTPSA id g21sm6621507pfk.30.2021.03.12.13.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 13:15:18 -0800 (PST) Date: Fri, 12 Mar 2021 13:15:14 -0800 From: Vipin Sharma To: Jacob Pan Cc: Tejun Heo , 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 Subject: Re: [RFC v2 2/2] cgroup: sev: Miscellaneous cgroup documentation. Message-ID: References: <20210302081705.1990283-1-vipinsh@google.com> <20210302081705.1990283-3-vipinsh@google.com> <20210303185513.27e18fce@jacob-builder> <20210312125821.22d9bfca@jacob-builder> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210312125821.22d9bfca@jacob-builder> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, 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 need to be migrated if the process is > > > > moved to another cgroup. i.e. charge the destination and uncharge the > > > > source. > > > > > > > > Do you think this behavior can be achieved by differentiating resource > > > > types? i.e. add attach callbacks for certain types. Having a single > > > > misc interface seems cleaner than creating another controller. > > > > > > I think it makes sense to add support for migration for the resources > > > which need it. Resources like SEV, SEV-ES will not participate in > > > migration and won't stop can_attach() to succeed, other resources which > > > need migration will allow or stop based on their limits and capacity in > > > the destination. > > > Sounds good. Perhaps some capability/feature flags for each resource such > that different behavior can be accommodated? > Could you please include me in your future posting? I will rebase on yours. Hi Jacob Based on Tejun's response, I will not add charge migration support in misc controller. I can definitly add you in my future posting, if you still wanna use it without charge migration support. Thanks Vipin