Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp710058rdb; Thu, 30 Nov 2023 16:52:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGS3/27wJtiiZgm0jkIJzUwkSilQ1vmBN7CqQClQFvfW4arh115bKl8ptEvcHMU7DQ5C5uA X-Received: by 2002:a05:6358:2624:b0:16d:f932:b5f with SMTP id l36-20020a056358262400b0016df9320b5fmr18037454rwc.30.1701391941198; Thu, 30 Nov 2023 16:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701391941; cv=none; d=google.com; s=arc-20160816; b=tBom/x3yex2OHEZtzEm+ZEov/kdsrM2v9N9f2bUFhmOkfwNttWPtm1JbIvKpzVofyn ZYAEInQx5UwtF8mefYaVer0SeRBcsro8N0FnE5/HRtOuq26UuAjWGaIE/B7CrSK1pzQ2 LpysWj5UsioyXkdSmwsRjAeEi6E/MDe/c8vSxaENxGiwxlHeb01Il2r1Zhf6sXs5Kwi+ NXFQCsGzduR01jYyH0DG/O0/Ua8cmJXmgSRVh0N/i661knPYi3JEpa10ppGK8vUk4pGk BxRiYhivd6MI0QTZCb/5OJGbE7IyOdAfiCPv2c5bAeBescRYVdXzd5yeQjdlaasDOXtD toBw== 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:message-id:mime-version:date :dkim-signature; bh=D7rrSw0NQO055D8S8vjtnTn1EUTQ7K87+88fh2pqZsE=; fh=9yXEeLJ6v9CAeuCLkm41A0CVM/jr+jgYGuwt5cU8zTM=; b=QCb09sRRGCwyMQDL4ORI7fqAmROrnpuCN112svzH8Nxsl8y9Ytv3MtMADg+Z8TaUzR 2oJTQ80Qj8DCozMravuyqtCdiHysBu11Ts5jxMDbboOV8KJ20FD5qw5NOOXOllHoy5mL m5+QWCOnxaOM63GY4i+RfYH0kdYJNVMK3egKre8aboqIbeXOBdTMoKF2GXF2JfCXWByl NRhX3q3z7HclEuLbQujeRCamHCtbBzeaWsjQas/WxEPteUetJ8ON7x7h6QNlCID3POt6 8WHMThXeKsltKKthCqYWsjTRhGyXwOLJ+a1tRlOwMBoCZ1XLOgioQ/5OZR7ph9z46AvT 3jBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="WLHN/zDn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u2-20020a656702000000b005c1b5a5213esi2224229pgf.768.2023.11.30.16.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 16:52:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="WLHN/zDn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 465138022876; Thu, 30 Nov 2023 16:52:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229630AbjLAAwD (ORCPT + 99 others); Thu, 30 Nov 2023 19:52:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbjLAAwC (ORCPT ); Thu, 30 Nov 2023 19:52:02 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD96210D0 for ; Thu, 30 Nov 2023 16:52:08 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5d12853cb89so26594897b3.3 for ; Thu, 30 Nov 2023 16:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701391928; x=1701996728; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=D7rrSw0NQO055D8S8vjtnTn1EUTQ7K87+88fh2pqZsE=; b=WLHN/zDnudw72XGN7U34kCKpO9lItXRoXISxGG274BqlzUxYGE/vC8koDz324GYsvN TYFPJTlR+An7MSdXAmSV9aCshp/RtFPa86q7rrUFcSc5pKz8HcSq8hdlFGDWCBG6eM7J y9hGA+vJT9Ic2+29/gpVikI0kD1er6/+l32/amIKIg4oqELjW4AwqKGLdAEUw2UYE5Nb e5bVuiN1vTEJ2CAQGM8hBbqr8lFYfypzgKm8xBfr1OmuJ0F0deFNy2hmhGkHxrmNzGJI WPc4O8+spOEdwXZ3H9I5vvTHlEPzxxyuwmjcy5Cozz76ertBFfaj3ikaBjUjzSivZ1OO ihUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701391928; x=1701996728; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=D7rrSw0NQO055D8S8vjtnTn1EUTQ7K87+88fh2pqZsE=; b=WDo0VIOz4H8d7wFf183urUyqnHfbZk4+82Ywhggj+s5ENYadukB5uKx9QkHAqn6OHN 1glPYNAaBEzgLTsbN+AxuEilviWUERQq7hgkDkkEHB+WKWL8qlenZaq/h9ErIgFuDtpa VFvYbNygMezuwihPndu6dQ0BuZIWeyw3Oql7scQHlCL3oEdI7wDlijfxoJpzp/bKjCxM gZE6BceuB0vi6okMXqx2U2+uv4a4ojQTfF45E4p9jw81a9b2SSfRIJ51oGyKvRtic4HV jYetZuWdT293v1O8nhyDDhL6fnIYiar4gXQLB/fi4s+jd8zdTz6VlHqj4num2pO9mWqj 7oHQ== X-Gm-Message-State: AOJu0YzZKJdOrzhQFOT1jdO0UGazM6tuPjsqLJm6O6ZBCzkBhhCVZfGk 2XhMTU1/0A5PpLZ4SSlqOBKGOVBV2qJb X-Received: from joshdon-desktop.svl.corp.google.com ([2620:15c:2a3:200:6088:f608:a3e0:af40]) (user=joshdon job=sendgmr) by 2002:a05:690c:845:b0:5a8:205e:1f27 with SMTP id bz5-20020a05690c084500b005a8205e1f27mr755718ywb.6.1701391928055; Thu, 30 Nov 2023 16:52:08 -0800 (PST) Date: Thu, 30 Nov 2023 16:52:03 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog Message-ID: <20231201005203.309873-1-joshdon@google.com> Subject: [PATCH] cgroup: Fix documentation for cpu.idle From: Josh Don To: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet Cc: cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Don Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 16:52:15 -0800 (PST) Two problems: - cpu.idle cgroups show up with 0 weight, correct the documentation to indicate this. - cpu.idle has no entry describing it. Signed-off-by: Josh Don --- Documentation/admin-guide/cgroup-v2.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 3f85254f3cef..9debf02bcb39 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1093,7 +1093,11 @@ All time durations are in microseconds. A read-write single value file which exists on non-root cgroups. The default is "100". - The weight in the range [1, 10000]. + For non idle groups (cpu.idle = 0), the weight is in the + range [1, 10000]. + + If the cgroup has been configured to be SCHED_IDLE (cpu.idle = 1), + then the weight will show as a 0. cpu.weight.nice A read-write single value file which exists on non-root @@ -1157,6 +1161,16 @@ All time durations are in microseconds. values similar to the sched_setattr(2). This maximum utilization value is used to clamp the task specific maximum utilization clamp. + cpu.idle + A read-write single value file which exists on non-root cgroups. + The default is 0. + + This is the cgroup analog of the per-task SCHED_IDLE sched policy. + Setting this value to a 1 will make the scheduling policy of the + cgroup SCHED_IDLE. The threads inside the cgroup will retain their + own relative priorities, but the cgroup itself will be treated as + very low priority relative to its peers. + Memory -- 2.43.0.rc2.451.g8631bc7472-goog