Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp114345iob; Tue, 3 May 2022 12:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ32D7fffi5pEWCFlIen/JKpOgbv0DEExiViQ4tyOVQ8ZZAo2C7OiHCfSYZO80xTOFAx3L X-Received: by 2002:a17:902:8f94:b0:14f:d9b3:52c2 with SMTP id z20-20020a1709028f9400b0014fd9b352c2mr17898426plo.103.1651607416046; Tue, 03 May 2022 12:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651607416; cv=none; d=google.com; s=arc-20160816; b=i6zRSx06VTdwyYu8p1OyNBXXZmLldyI9RPFmqywhhzzZVDvVoRKdW47N9ZR4P9RoAE tfit8/Qq16z7QiCYlYTX3z6tnaVN+hX0wau5JB20Gb8kEB2qk5gtLyAoSHqh7a34tq/c nb37XGjmE91COJeP82KorYJYELQ7oppWOyMgKLzKzkUfybHdzxuDWrco0Zgsypqz9CpX R0ay9VkS45Q0qLBFsJzT5Jc33fyozyZ/e7fnpg+9/aFcNjpMqwjLy4OarvFVu5niyHoM T4qJIFKuBr9uHXgCf32JHcPjBeoHX1P5z66o9g3B8Wl67ePsVZu6MQmXfphnEkKKyEUP xxbw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+g2uJIOUxcZwM6c5aOyAIEGRNprcj0Uo89xpRn5Hq6Y=; b=PDkJaGNy5eVal7ti6Z0WGfoXAKjQBQiz6CcHx8hckyineCLAQ/XOrvaIEVyylCRyvQ fEUEE/oKXzfVj6fg4SfN5IrMyHNgFcGs5jwTQK/FzxXCy0QO3EiDSjyq7YMOVExZpzOK ciqWyZXnggx7VrA4ITveTX+dMmsYBW6L9o11b9LEtglOVPfubs43WN4yD8DiD+b4c0n4 3P/rE/cB4WrfwuOxSTDNuSEGI/KtsMvCHtGlr3St94Rl2fSr6UTMrD1N+A97hRPxplgL bmQiqZw08cBC2IWkNOuPxrGAaFPeQCCYg0AwOTtMh8v5kcC/lFEJ5Jl2T0gCPI/AZx5a i/zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OXWCLkcg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob3-20020a17090b390300b001dc4eff067asi3132143pjb.91.2022.05.03.12.49.35; Tue, 03 May 2022 12:50:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OXWCLkcg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239396AbiECQ0k (ORCPT + 99 others); Tue, 3 May 2022 12:26:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236107AbiECQ0Z (ORCPT ); Tue, 3 May 2022 12:26:25 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0723D3B29F for ; Tue, 3 May 2022 09:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651594969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+g2uJIOUxcZwM6c5aOyAIEGRNprcj0Uo89xpRn5Hq6Y=; b=OXWCLkcg9JQv1vfmy1/qvc8wvTms1hbAgBEe6dUfq+JfGpXqF8++k6QImWKyxZhM0joIs8 pyYyOUcunVMzXORv7Rxn7Hqv/8x66/91J9XMaUOgH7ErH3+qJVqOYYXubou9ObJ/J4N/Pj sTSAwvZ4QjKooNFvnv5o/iOl5OkhMyM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-207-OAKLH312M7mYzR7U9EhSwQ-1; Tue, 03 May 2022 12:22:38 -0400 X-MC-Unique: OAKLH312M7mYzR7U9EhSwQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1EC7B1014A64; Tue, 3 May 2022 16:22:37 +0000 (UTC) Received: from llong.com (dhcp-17-215.bos.redhat.com [10.18.17.215]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33882403373; Tue, 3 May 2022 16:22:36 +0000 (UTC) From: Waiman Long To: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli , Frederic Weisbecker , Marcelo Tosatti , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Waiman Long Subject: [PATCH v10 0/8] cgroup/cpuset: Major cpu partition code restructuring Date: Tue, 3 May 2022 12:21:41 -0400 Message-Id: <20220503162149.1764245-1-longman@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v10: - Relax constraints for changes made to "cpuset.cpus" and "cpuset.cpus.partition" as suggested. Now almost all changes are allowed. v9: - Add a new patch 1 to remove the child cpuset restriction on parent's "cpuset.cpus". - Relax initial root partition entry limitation to allow cpuset.cpus to overlap that of parent's. - An "isolated invalid" displayed type is added to cpuset.cpus.partition. - Resetting partition root to "member" will leave child partition root as invalid. - Update documentation and test accordingly. v8: - Reorganize the patch series and rationalize the features and constraints of a partition. - Update patch descriptions and documentation accordingly. This patchset include the following enhancements to the cpuset v2 partition code. 1) Allow partitions that have no task to have empty effective cpus. 2) Relax the constraints on what changes are allowed in cpuset.cpus and cpuset.cpus.partition. However, the partition remain invalid until the constraints of a valid partition root is satisfied. 3) Add a new "isolated" partition type for partitions with no load balancing which is available in v1 but not yet in v2. 4) Allow the reading of cpuset.cpus.partition to include a reason string as to why the partition remain invalid. In addition, the cgroup-v2.rst documentation file is updated and a self test is added to verify the correctness the partition code. Waiman Long (8): cgroup/cpuset: Add top_cpuset check in update_tasks_cpumask() cgroup/cpuset: Miscellaneous cleanups & add helper functions cgroup/cpuset: Allow no-task partition to have empty cpuset.cpus.effective cgroup/cpuset: Relax constraints to partition & cpus changes cgroup/cpuset: Add a new isolated cpus.partition type cgroup/cpuset: Show invalid partition reason string cgroup/cpuset: Update description of cpuset.cpus.partition in cgroup-v2.rst kselftest/cgroup: Add cpuset v2 partition root state test Documentation/admin-guide/cgroup-v2.rst | 145 ++-- kernel/cgroup/cpuset.c | 712 +++++++++++------- tools/testing/selftests/cgroup/Makefile | 5 +- .../selftests/cgroup/test_cpuset_prs.sh | 674 +++++++++++++++++ tools/testing/selftests/cgroup/wait_inotify.c | 87 +++ 5 files changed, 1295 insertions(+), 328 deletions(-) create mode 100755 tools/testing/selftests/cgroup/test_cpuset_prs.sh create mode 100644 tools/testing/selftests/cgroup/wait_inotify.c -- 2.27.0