Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4091985pxf; Mon, 29 Mar 2021 21:47:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk+oQnG37JopCO08CWXUCEI5yYAN2qYifGY0uIyXA2B+6pzGamH0KXINXhC5a20VHxB0v0 X-Received: by 2002:a05:6402:c:: with SMTP id d12mr31135917edu.100.1617079670594; Mon, 29 Mar 2021 21:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617079670; cv=none; d=google.com; s=arc-20160816; b=ULAkGKYZsXMotl32H9pr8gMsUM6MgY8Vom+G00LpVPGpNI5rqHq4Pi37MvHcdTXY2M PVO079uvIRCw/lBvIcXMzxKVpRQemBNpz2o+rEqp+pz4ZVTg2BZ7wQpuAXzp0+0+6nXA qE7yx5yvmemvawTg29+ykyUcmUEutDbi1trcLBxdAx5Uk0Xj+nHeLZFQxmiskd0hWcAM Nfe6Jt65Tniitbgo+4LDno/Cf+Ucl/wjICPrLqSPc/dvx7i8Pzyl5Kmy/94MtiNqzwLh KvJ0csgOD6PRWxxIoA+Vst5xTbJYKA7JIIqimo3f5GxU6plxYkuDydSIiwAlgtxPTKHF GBTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=ZG5QUoyChvalUArlsvwS9b7o5aZFFyWCCkEpBVXhtkU=; b=iDQ03mjW7PeoNXqfGjXyxEFDiGzoiKL53z7C6rE0WQHs/vtYUpbEMCSRglgh6P6OGe 4jgmLGYIhkyxRwQcY/oA/fMABDgl89Tr3Jf5n4i7riaD17PxZ2wHwD2/Z7XJnb7d6AE5 YHBJxmBMjdUNPswoouwF3VBjgXhE9UzN6bi6DBwFI6yDPPEziXsoA1vp5aiLjMLDn+JV FXRP0ESO1WYTc3ZZJz/S9Fpj6EcHYml2X/71Hgz6Rc+mCu1ov+jybS5DSUQeiGYF/rQE /ibhw0kDTzSiOsgAC4yIatXlWhReSdCI8W1jEMKmh8UTES4WFzqYgDT8avY7cEoYIKQG 1jIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=T1kmeXfP; 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 s14si917066edy.365.2021.03.29.21.47.28; Mon, 29 Mar 2021 21:47:50 -0700 (PDT) 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=T1kmeXfP; 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 S230462AbhC3Ems (ORCPT + 99 others); Tue, 30 Mar 2021 00:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbhC3EmT (ORCPT ); Tue, 30 Mar 2021 00:42:19 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47BF4C0613D9 for ; Mon, 29 Mar 2021 21:42:19 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id p18so953313pjo.8 for ; Mon, 29 Mar 2021 21:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=ZG5QUoyChvalUArlsvwS9b7o5aZFFyWCCkEpBVXhtkU=; b=T1kmeXfP5qGSZ6kep4Ip7I39cg7FJgeB41AxNkyrCF1cJOe35DF0q4XjnSJgpguGuy MIoPDeLDnLnIJW92Cs5ZAcj34Gq5hVBp9CMY0asY9O9KXi8o7g1giMP0E+N45eZbeAcI r/cVavsl8GOUfUmhABHZ72n+l3pqapmOQyqs7EL31QmWDr0rbfxsXUBlbg/DmsKC/Fg6 OmTWkIykKglteesDu67g4eIeqmQaVa+LnyNv27knRfRh97w7A4Oa43EUO/IyQESpep+m aHhc9lCqpU01mrSoMpZPtkljauQYWkiFbo1Zb29x3QJyFgN3T40x0t2dxtlR0+s3dlK0 xrUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=ZG5QUoyChvalUArlsvwS9b7o5aZFFyWCCkEpBVXhtkU=; b=KhocZRKAXsG3n82nIVZ+Dx3PcVyzEOsKhKs8OrcXQ/lz542Fw0au0SIgedLKPEDPjm boztqYiNJHwojnOlDABIcEAhujHLounf8EQrl9T5ch0UmBu2Cn13qdtLXQgEML384CJh AUpf7m+wiuMV5Jsp9pIxmcN2mBdoEYsT6OkWgA08YU3t9UOopTss7OR4+cvU2fWF8bkX LDnlfRIqUGZTVCuf8szE02AFCzdfmmNb22KZDh/Vb2BN0mWqfUdgCtYAo4GADXa6e720 WGlx11F2ic4kQ62Uyph6t+Erbh9ZifIfGpZF11oGwLo3+/yh2IFlIN21OYmdI59WEeCw N1Xg== X-Gm-Message-State: AOAM531S5rAgMxLktWN9Xytsq00uwMI+Aufd4IP3XtcjaE45Q0nJheQe u+99Jr27coJqHpVsdTYmVvfdsJgwdbbK X-Received: from vipinsh.kir.corp.google.com ([2620:0:1008:10:8048:6a12:bd4f:a453]) (user=vipinsh job=sendgmr) by 2002:a17:90b:2304:: with SMTP id mt4mr2545123pjb.179.1617079338730; Mon, 29 Mar 2021 21:42:18 -0700 (PDT) Date: Mon, 29 Mar 2021 21:42:05 -0700 In-Reply-To: <20210330044206.2864329-1-vipinsh@google.com> Message-Id: <20210330044206.2864329-3-vipinsh@google.com> Mime-Version: 1.0 References: <20210330044206.2864329-1-vipinsh@google.com> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog Subject: [PATCH v4 2/3] cgroup: Miscellaneous cgroup documentation. From: Vipin Sharma To: tj@kernel.org, mkoutny@suse.com, jacob.jun.pan@intel.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 Cc: 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, kvm@vger.kernel.org, x86@kernel.org, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Vipin Sharma Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + Documentation/admin-guide/cgroup-v2.rst | 73 ++++++++++++++++++- 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 Documentation/admin-guide/cgroup-v1/misc.rst diff --git a/Documentation/admin-guide/cgroup-v1/index.rst b/Documentation/admin-guide/cgroup-v1/index.rst index 226f64473e8e..99fbc8a64ba9 100644 --- a/Documentation/admin-guide/cgroup-v1/index.rst +++ b/Documentation/admin-guide/cgroup-v1/index.rst @@ -17,6 +17,7 @@ Control Groups version 1 hugetlb memcg_test memory + misc net_cls net_prio pids diff --git a/Documentation/admin-guide/cgroup-v1/misc.rst b/Documentation/admin-guide/cgroup-v1/misc.rst new file mode 100644 index 000000000000..661614c24df3 --- /dev/null +++ b/Documentation/admin-guide/cgroup-v1/misc.rst @@ -0,0 +1,4 @@ +=============== +Misc controller +=============== +Please refer "Misc" documentation in Documentation/admin-guide/cgroup-v2.rst diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 64c62b979f2f..b1e81aa8598a 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -65,8 +65,11 @@ v1 is available under :ref:`Documentation/admin-guide/cgroup-v1/index.rst misc.max + + Limit can be set to max by:: + + # echo res_a max > misc.max + + Limits can be set higher than the capacity value in the misc.capacity + file. + +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 process to a different cgroup does not move the charge to the destination +cgroup where the process has moved. + +Others +------ + perf_event ~~~~~~~~~~ -- 2.31.0.291.g576ba9dcdaf-goog