Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2175651pxf; Sat, 13 Mar 2021 10:11:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxv+q34WiYs3bS2kMgLVwOuvvM6vxI2QnFRpxHTQy4FwEd03uWYaBD82No4rZ5rN8Vu/Wm9 X-Received: by 2002:aa7:d511:: with SMTP id y17mr21075241edq.275.1615659100095; Sat, 13 Mar 2021 10:11:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615659100; cv=none; d=google.com; s=arc-20160816; b=NJVv/8ntQoGN56VvIFdunhgcfjsdsNoxJ8M/1AOr0LjTzc0Z2OCxuOp14a2uAUUF+X xR3TUc2uvvAwMKeQTKKoXJh/2JtcSJ1VvpQ3vPiKVTENeXUqxkW14+3alYLADR55SHKz 7gLwURLmpWlwOAfidxd+9Qtvub9yrX1nfA+xA6mNPd38F5Oxnep8+2j3PM4DPiCLELHL yuwOR2SXguyVk5x1pvMEyy05WrrgHTzxH9/kofQ6tZMWiO3WViEPGUYSUIb579XQVIK4 eXIXADcNz3N4/jsAZ8JVwdQbou2+gImMB1Gm/A+GVvsuPlHrqL4LcwYajm9TkuLSgExA Tkrg== 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:sender:dkim-signature; bh=qmztczQ8nwlB2ZsLfNT+eUr55Vm8FQvEeckkwobT4Fo=; b=vfXDdk4DZWdaxlQjq5a2kfYnXd1t/06SHsGmwzdB7obFQqb6t8uyeZnD3o15OCVhVe xnI+F1IBEvV4HCVhjen/9OI+sKlJO0Bf/X8gpwMPQcEc3pKb4gKh3rOMHcOsfun35vR8 g2fKYCnbirGTG0frhLY6SklNZFEWflYZiSbdjF6oPZKxkgdPU1iKZv8SFmBcwFY+gYp4 7nzMLUgz3RA5qm8m+hTMHqF1Xz+QYX/0aCx2J+vXCnkpZ/e9nsZCvd6NGsdsp76pp8Nf cSMC42CzjIkeiH/Onkf1CheQ+F/GsUs7Zr4/ayVXnJbo4li3uA4FA4Jtw1BH/S/k+UNk Ucjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J7BNxH+9; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si7211035edv.49.2021.03.13.10.11.17; Sat, 13 Mar 2021 10:11:40 -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=@gmail.com header.s=20161025 header.b=J7BNxH+9; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234322AbhCMSHO (ORCPT + 99 others); Sat, 13 Mar 2021 13:07:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233635AbhCMSGp (ORCPT ); Sat, 13 Mar 2021 13:06:45 -0500 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A31C061574; Sat, 13 Mar 2021 10:06:45 -0800 (PST) Received: by mail-qt1-x82c.google.com with SMTP id l13so6393122qtu.9; Sat, 13 Mar 2021 10:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qmztczQ8nwlB2ZsLfNT+eUr55Vm8FQvEeckkwobT4Fo=; b=J7BNxH+9zAJSpZT49oEVvoljADKL0mcaBvvxC0C2vlCBSuitKhdzpCMx3KI7BfdLdR /OVlpcir79WWkWYHgudf7wc9wI4ikkGV/oj89W25FwqepTpfgBDOv3TxCNN1z0uOgJoF SY+FzlHUH+gZypRWujGQZPCo07NOekPMlT6BO8sJqBPNB+gWKZZKCGZuL/ixT0afD7hq OlHTJCfLA8dLtgYqCXf/rFP71y5lTue4Qkq7ePDIAbamQLwhl562yOeZmScANXRCkB69 aY1f6sROr7S36dtchcv8kUNsxshmcp7+lC20LpV2jCcBoL7a980V+Pouv5fVkFtI4Qzb bDKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=qmztczQ8nwlB2ZsLfNT+eUr55Vm8FQvEeckkwobT4Fo=; b=j2xSpHUseQZns+GrsvZe0cZ1wXLmFVJJij0sMkONS0QzpFzZiYtOqMtoZFMQyG/N0+ iyeHsxdhwBpm1yn44Lvdmc6yzoLZyUvTbC9B21nay6DUcmetErQNwhe2ZwSfK9s/N6AA Q0+gxa4Ask3XXdpPgESa1l1vYhxz5sYKPbYsVZ5/60Q9cSmz5jKxjXffIHmav6HlRUZw iJvD8tn22wyUVjCa+4g0vziee72EQXqxuo2Q9ctbiTHcSM7kYQegoT+pJjuGnV3l/erh TNiV5TW/O3PriavS0jfZvkHPhfRIhEUlzZl4r/bkjQ12nTrp46i8R2C6itlo+Lo/HbOS ohJQ== X-Gm-Message-State: AOAM531n1pSpQ+MwwtfqHwaweY1o137huGAWIvHZtNA71ZLbw6h0OvjL KBOSJqseyC5HtZ89UKdn+GI= X-Received: by 2002:ac8:4543:: with SMTP id z3mr17030003qtn.286.1615658803977; Sat, 13 Mar 2021 10:06:43 -0800 (PST) Received: from localhost ([2620:10d:c091:480::1:fde1]) by smtp.gmail.com with ESMTPSA id k138sm7201936qke.60.2021.03.13.10.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 10:06:43 -0800 (PST) Sender: Tejun Heo Date: Sat, 13 Mar 2021 13:05:36 -0500 From: Tejun Heo To: Jacob Pan 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" 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> <20210312145904.4071a9d6@jacob-builder> <20210313085701.1fd16a39@jacob-builder> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210313085701.1fd16a39@jacob-builder> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 we needed the initial migration to seed new cgroups and it gets really confusing with other ways to observe the processes - e.g. if you follow the original way of creating a cgroup, forking and then moving the seed process into the target cgroup, if we don't migrate the pid charge together, the numbers wouldn't agree and the seeder cgroup may end up running out of pids if there are any restrictions. > I also didn't quite get the limitation on cgroup v2 migration, this is much > simpler than memcg. Could you give me some pointers? 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. > 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. Can you please elaborate what wouldn't work? The new spawning into a new cgroup w/ clone doesn't really change the usage model. It's just a neater way to seed a new cgroup. If you're saying that the overall usage model doesn't fit the needs of IOASIDs, it likely shouldn't be a cgroup controller. Thanks. -- tejun