From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC050386C39 for ; Thu, 14 May 2026 17:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778778201; cv=none; b=sTbZQP8Y9HaUKPLC+E/H9z463eOCyNpN8E52ZP8CSbc21kh0Ow4O02RpYKwb+DcoPgMAWj4n04APvCRmLq8TSS6EXkZ1u9lALY1n11FPGtBB0hfgDpwaMjJxcvAwDTQarK7H6QzfbEW2hcpEe0OMlYhEyjDArP6Nx+C4m6rB4uY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778778201; c=relaxed/simple; bh=1A0VuW92ZAtv/Y3U6FydPsi+eA1iOsXjAC/p2wnv5xM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kFkXsyRGw23NuFCFR0/7SgbF0uWR33G/H1JNSU3Ej8R59yeb6QaVMhmp3QR6+9TxZB8YLFizIMFFsMZGEIJjiWmetE/xAI9+KoVc3U2eNFZXGiR+Bnh+e5x6ak19tndtpcYIfhGls2OiVYtA8qCo+O9mYbeyBns24Ust00d1sJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XtmtiTe9; arc=none smtp.client-ip=170.10.129.124 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.b="XtmtiTe9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778778199; 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; bh=JbOJplPDsGvObwfjpsndJMHOv2nTmFWYSYl9cgAVQFQ=; b=XtmtiTe9isgCCKdOcDqsughcg8urfiopznyIi6CKUYVMPLcLDeO1vhexyLQoB0sWqZH5tl fB9M6Zk8wrrWzU2ljBDKZRkJBv9HRGmoTBaloitE+MTJd5HD5JOXZOxH6tAO822JttSEj4 HbqGiV7hOGLBy2z089DKeI0sdTfHXls= Received: from mx-prod-mc-06.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-111-1lgz9fp-PA2mv-7ItbwFDw-1; Thu, 14 May 2026 13:03:12 -0400 X-MC-Unique: 1lgz9fp-PA2mv-7ItbwFDw-1 X-Mimecast-MFC-AGG-ID: 1lgz9fp-PA2mv-7ItbwFDw_1778778191 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A779618005B2; Thu, 14 May 2026 17:03:10 +0000 (UTC) Received: from llong-thinkpadp16vgen1.westford.csb (unknown [10.2.16.73]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9884730001A2; Thu, 14 May 2026 17:03:07 +0000 (UTC) From: Waiman Long To: Chen Ridong , Tejun Heo , Johannes Weiner , =?UTF-8?q?Michal=20Koutn=C3=BD?= Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Dietmar Eggemann , Aaron Tomlin , Juri Lelli , Waiman Long Subject: [PATCH cgroup/for-next 0/4] cgroup/cpuset: Support multiple source/destination cpusets for cpuset_*attach() Date: Thu, 14 May 2026 13:02:36 -0400 Message-ID: <20260514170240.575156-1-longman@redhat.com> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Sashiko AI review of another cpuset patch had found that cpuset_attach() and cpuset_can_attach() can be passed a cgroup_taskset with tasks migrating from one source cpuset to multiple destination cpusets and vice versa. Further testing of the cpuset code indicates that this is indeed the case when the v2 cpuset controller is enabled or disabled. Unfortunately, cpuset_attach() and cpuset_can_attach() still assume that there will be one source and one destinaton cpuset which may result in inocrrect behavior. This patch series is created to fix this issue. The first 3 patches are just preparatory patches to make it easier to review the last patch which fixes this problem. Waiman Long (4): cgroup/cpuset: Add an alloc_dl_bw() helper cgroup/cpuset: Expand the scope of cpuset_can_attach_check() cgroup/cpuset: Optimize cpuset_attach_task() cgroup/cpuset: Support multiple source/destination cpusets for cpuset_*attach() kernel/cgroup/cpuset-internal.h | 6 + kernel/cgroup/cpuset.c | 315 +++++++++++++++++++++++--------- 2 files changed, 230 insertions(+), 91 deletions(-) -- 2.54.0