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.133.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 D7DB32236E0 for ; Sat, 13 Dec 2025 04:59:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765601948; cv=none; b=hrhYcqFwisFe/1+jsmOdsnLLwyUlFVZgP8m80jz9UentMxQnkty9YKbK6MBadkuV5leZa6IyPIkXqCi8vVtDogfE326ywBduf3jIpVcG+WQxBLM3mJPGEeseUmST0IrXFqcV9RAdGi5EOwCzOlwT76tBQvV18itNSn0jdN/PNnE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765601948; c=relaxed/simple; bh=yPzs/f+Lh44vbmrhItPCB7ZJc+MI/3tKjjsKrA9CI9I=; h=From:Message-ID:Date:MIME-Version:Subject:To:Cc:References: In-Reply-To:Content-Type; b=ltAiJgClHLMGeZkQPvjuZhSXHZRcLP6bv8N3hU1TUUgfDVycZdcXSGwE2Z3+utuchQIXBtG0vHkjyebUWOXWRMy6P1dn3ntIFf0yVC6ffuO2Q0NVcSRaopuZ++JgWigJ2ol5D6YoUpWy0HoIsurkz4dQp7VrviUBMcUZWkF0bSk= 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=GphHhu07; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=lNvE8Mo2; arc=none smtp.client-ip=170.10.133.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="GphHhu07"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="lNvE8Mo2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765601943; 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: in-reply-to:in-reply-to:references:references; bh=vJGiqBB7uCME6Sbe4VgAoga7zrBVZpzS1c9EWdQdkYE=; b=GphHhu07RzUmNx9ElROG/2LdEteAzocPwTn2YhpVAu7W7A6eVyMwquk4/zbRf0aX0uzoKZ gD+jlXFjupwF4WHY69kw0WaFCl7K+Oca3+f5pckjJmLLJlIoGQVhkWugG9NlZW3Mzv+WTP +e08vugIWx5kLpgQVFMV7NlfmlbCbWs= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-220-W2d5P_ojOAOqXmSN3ZzJ2A-1; Fri, 12 Dec 2025 23:59:02 -0500 X-MC-Unique: W2d5P_ojOAOqXmSN3ZzJ2A-1 X-Mimecast-MFC-AGG-ID: W2d5P_ojOAOqXmSN3ZzJ2A_1765601941 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2955f0b8895so19085785ad.0 for ; Fri, 12 Dec 2025 20:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1765601940; x=1766206740; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=vJGiqBB7uCME6Sbe4VgAoga7zrBVZpzS1c9EWdQdkYE=; b=lNvE8Mo2liI+cWn3q+4T0ifFJW3QL79udDs7ODRxeVFmapI6vxkxZNZkWMYTrWA+ob d44RHd52X46QGqCfXNHaGQsKYCKuPQpnFGDebwDiWK/+Omdpc5kpAKS7k+Vb0UBXh7g/ 2qCAThHRN6B3+scTgtjPfDWwEefs5z2+hpDEK2z725qgzIjGeraTqQvqyIhyMxu9yqJh cp73gqLxGArRcgzFAmXHMpdHnvOQ0kLDP2txs0LgRNTF0IZC92iSo0f+Gi9Ql2zzNMhL 3Lynrcezx3yVDP+h5vDnDN3G58SAQid2q2hdAm+5cfmW4Lb2FCiY0+yIV7gKMBRvpK3D VHIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765601940; x=1766206740; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vJGiqBB7uCME6Sbe4VgAoga7zrBVZpzS1c9EWdQdkYE=; b=Z7f3DgU+xD8X9sh5pSPtsfFaNAFmiLSADY0CX3XWFMcomfm0EZZZ5DDoeGM6OJGfo3 /R3Bee9AvQcy58kWcIRU9q/An8l93L+9EKLNhyew0VLuKtGhuLC/1MIhhNUrLWgR5VU3 ddKjxnE6U4ENgeOFSPPBtCII+wRKmEmkAWp4XIwnHOrLp5vm9Af03xwJBvd5MY8T9122 G4d5m7CmsvNj7b51q9EDFWrYKhTep344oToTtQMqMGxqA8wLRJJ68BeM6iDOpWPoPmF4 uRG/psDuIB944cX5KwgI2dBZh5VbxNjajL38YbLjvD3ATZehjfQ4UpGhbuujllbTri1x 2WDA== X-Forwarded-Encrypted: i=1; AJvYcCWfuK7rwOKKFcZ3AS669sq4y7IxoMlYPNzW4EVkHAU0khDEdv7t3iKmjLSLOMuAGzirCiu99jsr/lP+Byc=@vger.kernel.org X-Gm-Message-State: AOJu0YxVIsgR3NFBTlFm5QiwmP2IkdOQXbn6GawUGkKTB00VJrWs6DCe 8ThjmI1i8PmNLqxN4gQlR3FBJ5mvUErIxiciBUBqqz3cqRFACwL4e0OvQur7IfUEZ8MuWC7pcE7 pEAgQFHhHnDsMnvTtKRPYuujUVFP9L8ZcHr8+tdHRmzG/0KYrtYr6rEkSq26EECafRZkJtvfgMg == X-Gm-Gg: AY/fxX6y69kOSExvd8SuQWHIYyfRCG13QCLwqqPxOz8twFSisgB0yBOvvp1iMV/q3gp OhGF38c3EV+eY5kcnb1wZHxVJbA38+soAG+C5Xwwpfe7tYNKdpY8z9imbMfGLKCMdaZ3uHh4nzj NqWw5S+u3Q3N9L2+ia0TPdcvzJeuQhk2Ze4u5gBRU5ZqxYAw8PPHYGmpq36DD68SFW/cIHmmnQt 5o0BiQqvwpu6UtqVGdyfJEgN/Tde+uDIAto8IbyvhsLaYiv01P+h4cHUrXqWyAEz9ZSjt2F4u5F 6iwcYI3xb93OMQvAxC/3/HcLj3VkNxvhFntKQ4oyRg12w69seGgIqTd4JTVgxUUZ8iC9GOxl1UJ hfuxQ49V9c7ucQdA1ucAJqJmo3WKG4/plcVYD37UBlrY= X-Received: by 2002:a17:902:da92:b0:295:28a4:f0c6 with SMTP id d9443c01a7336-29f24800550mr46650845ad.0.1765601940321; Fri, 12 Dec 2025 20:59:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2XlZ804IhqEpFO2N9sRBt5uGyIMXcNGs6Cj7VK4kPb19a3EfN0cxzXdjmp0UnK+0tBp2ahw== X-Received: by 2002:a17:902:da92:b0:295:28a4:f0c6 with SMTP id d9443c01a7336-29f24800550mr46650615ad.0.1765601939917; Fri, 12 Dec 2025 20:58:59 -0800 (PST) Received: from [10.200.2.27] (fs98a57d9c.tkyc007.ap.nuro.jp. [152.165.125.156]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29f2e40765csm30273205ad.0.2025.12.12.20.58.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Dec 2025 20:58:59 -0800 (PST) From: Waiman Long X-Google-Original-From: Waiman Long Message-ID: <1e2eef0a-4637-4b4f-aea5-71e3e519757d@redhat.com> Date: Fri, 12 Dec 2025 23:58:53 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5] cpuset: Avoid invalidating sibling partitions on cpuset.cpus conflict. To: =?UTF-8?Q?Michal_Koutn=C3=BD?= , Waiman Long Cc: Sun Shaojie , chenridong@huaweicloud.com, cgroups@vger.kernel.org, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, tj@kernel.org References: <20251119105749.1385946-1-sunshaojie@kylinos.cn> <3jkvuruuxdykpxjjdwhuqjfqi4nrtxojotswaoc7ehuwxp4s32@hfrvfato6q5b> Content-Language: en-US In-Reply-To: <3jkvuruuxdykpxjjdwhuqjfqi4nrtxojotswaoc7ehuwxp4s32@hfrvfato6q5b> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/8/25 9:32 AM, Michal Koutný wrote: > Hi Waiman. > > On Wed, Nov 26, 2025 at 02:43:50PM -0500, Waiman Long wrote: >> Modification to cpumasks are all serialized by the cpuset_mutex. If you are >> referring to 2 or more tasks doing parallel updates to various cpuset >> control files of sibling cpusets, the results can actually vary depending on >> the actual serialization results of those operations. > I meant the latter when the difference in results when concurrent tasks > do the update (e.g. two containers start in parallel), I don't see an > issue with the race wrt consistency of in-kernel data. We're on the same > page here. > >> One difference between cpuset.cpus and cpuset.cpus.exclusive is the fact >> that operations on cpuset.cpus.exclusive can fail if the result is not >> exclusive WRT sibling cpusets, but becoming a valid partition is guaranteed >> unless none of the exclusive CPUs are passed down from the parent. The use >> of cpuset.cpus.exclusive is required for creating remote partition. >> >> OTOH, changes to cpuset.cpus will never fail, but becoming a valid partition >> root is not guaranteed and is limited to the creation of local partition >> only. >> >> Does that answer your question? > It does help my understanding. Do you envision that remote and local > partitions should be used together (in one subtree)? It should be rare to have both remote and local partition enabled in the same system, though it is not disallowed. The local partition should only be used on system that run a small number of applications with one or just a few that need partition support. For systems that run a large number of containerized applications like a Kubernetes managed system, local partition cannot be used because of the way container management is being done as the actual cgroups associated with a container can be a bit far from the cgroup root. Remote partition was created for such a use case where local partition will be used at all. Cheers, Longman