From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794251417; b=H9aPes387kBNp8Wb/2ou1ZyQwH+wigNaJ43tBkFzqZ5DHDbT7LAXkFV7XvxiV9ISFw9Y ZTG27QKWHBfRPpH4kqADQtpbDHkJayo1vmWXjj1eckgkFjsnKrwD/jzLivDMJab9JwbgZ 2t1rK6VHh27vlnCaOezP9RDmc7eJJi/FSL0wzfVbHZHJoBFYs1q7bFnnvAGs+QUEsDOlx YYXC2LrEdKKkTUkD46R5E8mFj8iaKGxGaWQfBUVdW1DioNkYqg4885tdV7omUK6+Y1Yzr 2/t/DolHGv9kugZ198pdlOjKI95uLhDGyisNGE6gW1Mo/31yX/jTNctM3d7sc64hx+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794251417; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=WUCOrKKENO8IXlLMzZj3CvG/Cxz3vucJ04SUNwYIYhg=; b=VI+9lnH+UCHHs1s8fFXA2Fk+yEJ1PtuiQvHsU2JNiOeS040Dihn0hZHp53NIL42keKCD B/o85lFpYKpDR3n1tXH5yd9oI3YXdR6WXJW9wxlGGR6QBPG2VNESBNdnQ4jtryxUO8VdF oSW8gXLhXAN13gAojKr8Ll55pTblro5i6nPt5XE8bfXIrYPNoxSAUELmZkfWpopnU5358 psonfKxaK7gTz6CH80CMqSrgdSzjTSr1DFRVOpkp8Oo3VcZivERCD6JgqhbHH9C/w+Tuk 7hdPoQ1qY8pv4EdLu2gweTUJNGnXoHAabIs1PdHfbjrXBRdHlUaaRQQvk4//dVibX4w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WoP0iFue; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AE6F606A330 for ; Mon, 9 Nov 2026 19:10:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2AE6F606A330 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WoP0iFue DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1794251416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WUCOrKKENO8IXlLMzZj3CvG/Cxz3vucJ04SUNwYIYhg=; b=WoP0iFueoE1FJQf1Hoomd+ohTJS4fAereydHJb7boCkV0ZmswNC42L06BsPCiA2J2HBI4O tE+bb2zZoBnRKP6ZVM+xixyiEGnhQVHXwtgCRW87s5f1gEkZo6YyS2F0zktiM0pRJelRBJ rcehO7s0gfNljqLT6qMizXtXOLZ7/IM= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-112-feW_DZNdPGKoQi_sENCSDQ-1; Mon, 09 Nov 2026 14:10:14 -0500 X-MC-Unique: feW_DZNdPGKoQi_sENCSDQ-1 X-Mimecast-MFC-AGG-ID: feW_DZNdPGKoQi_sENCSDQ_1794251412 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3B8B518001E1; Mon, 9 Nov 2026 19:10:12 +0000 (UTC) Received: from llong-thinkpadp16vgen1.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 71A5A195608B; Mon, 9 Nov 2026 19:10:10 +0000 (UTC) From: Waiman Long To: Ridong Chen , Tejun Heo , Johannes Weiner , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Shuah Khan Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Guopeng Zhang , Waiman Long Subject: [PATCH-next v2 1/5] selftests/cgroup: Fix "test_cpuset_prs.sh -v" failures Date: Mon, 9 Nov 2026 14:09:51 -0500 Message-ID: <20261109190955.1398611-2-longman@redhat.com> In-Reply-To: <20261109190955.1398611-1-longman@redhat.com> References: <20261109190955.1398611-1-longman@redhat.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 When the -v option is used to run test_cpuset_prs.sh, it activates the use of sched-debug to determine the set of isolated CPUs which will also consider 1-CPU partition as being isolated though they will not be reflected in "cpuset.cpus.isolated". As a result, some of the expected isolated CPUs values have 2 different set of values to correspond to these two ways of determining isolated CPUs. Commit 6e4834ba8986 ("cgroup/cpuset: Fix incorrect CPU accounting with parent's effective_xcpus expansion") introduces some new test cases which fail when the -v option is used. Update the test cases to make them pass with the -v option as well. Also remove an obsolete comment in update_parent_effective_cpumask() of cpuset.c. Reported-by: Tejun Heo Link: https://lore.kernel.org/lkml/886a562b52b1c5094142d547a8336457@kernel.org Fixes: 362212853cd0 ("cgroup/cpuset: Fix incorrect CPU accounting with parent's effective_xcpus expansion") Signed-off-by: Waiman Long --- kernel/cgroup/cpuset.c | 6 ------ tools/testing/selftests/cgroup/test_cpuset_prs.sh | 13 ++++++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 85e5b529d144..6074327c3477 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2164,12 +2164,6 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd, else part_error = PERR_NOTEXCL; } - /* - * When both cs and parent remain valid, parent's - * compute_partition_effective_cpumask() call would have removed - * cs's effective_xcpus from the parent's effective_cpus. So - * there is no need to adjust parent's effective_cpus here. - */ } write_error: diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh index 32e1e44fa0b1..2d4744f2d6ac 100755 --- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh +++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh @@ -540,16 +540,19 @@ TEST_MATRIX=( # The extra CPUs gained by a child partition when its parent expands the # exclusive CPUs have to be taken away from the parent. - " C2-6:X2-5:P1 CX3-6:P1 \ - . . X2-6 . . . 0 A1:2|A2:3-6|XA2:3-6 A1:P1|A2:P1 ." - " C2-6:X2-5:P1 CX3-6:P2 \ - . . X2-6 . . . 0 A1:2|A2:3-6|XA2:3-6 A1:P1|A2:P2 3-6" + " C2-6:X2-5:P1 CX4-6:P1 \ + . . X2-6 . . . 0 A1:2-3|A2:4-6|XA2:4-6 \ + A1:P1|A2:P1 ." + " C2-6:X2-5:P1 CX4-6:P2 \ + . . X2-6 . . . 0 A1:2-3|A2:4-6|XA2:4-6 \ + A1:P1|A2:P2 4-6" # Both expansion and contraction of parent's effective_xcpus will be # correctly handled in child partition and the child can be invalidated # if a populated parent could lose all its effective_cpus. " C2-6:X2-5:P1 CX3,5-6:P2 \ - . . X4-6 . . . 0 A1:4|A2:5-6|XA2:5-6 A1:P1|A2:P2 5-6" + . . X4-6 . . . 0 A1:4|A2:5-6|XA2:5-6 \ + A1:P1|A2:P2 4-6|5-6" " C2-6:X2-5:P1 CX3-6:P2 \ . . T:X4-6 . . . 0 A1:4-6|A2:4-6 A1:P1|A2:P-2 ." -- 2.56.0