Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7219502rwr; Tue, 2 May 2023 11:08:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EE7M4WeFQzBLh9TMGsLO4/ZRvmkMOrkOW4qKYzsi3mEUbsB9h5KSzUV3yHkhEyTm9skY+ X-Received: by 2002:a17:90a:7a82:b0:24b:c580:1ab8 with SMTP id q2-20020a17090a7a8200b0024bc5801ab8mr16736871pjf.40.1683050922269; Tue, 02 May 2023 11:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683050922; cv=none; d=google.com; s=arc-20160816; b=xb2QhLd6zBOO/+80mnYVeMi4PZZvYDo19cTlCkg3IXqF8dyqBXC1CVTl5VRVnNy0Nm vi/LjL+kegFB2ide8kbXNHYgJbZmXzMzGGc8kcJ+ot+oU0KhiYIRHevXrSO8TbDlnZ1/ SaRhMBVafQhPbykfsZCjF12VFB+qTGRtqZ+IFeckmn2KYGEcSzyvK8/hVbVIGg7B5sSf t0PXP/GaIynhGbUqIxMTTqS8qgV5lzVrQz1HRWElwhtpmg6aaDTARsmGffEZUnF9yjfn WTwrSZOz3/p5c0kDuPykHwzYP+FZMqfcOmK2nxjE8w5v0BY0uiwxYM6067lPaZ9FfG9i zrxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+0f0hUbsvSFR9UE93IS6I2zL3LHIPpph9neOljoj1mE=; b=eVJIAR7btIYpYi2MvWh9dJn9lDOsMqSQCRoVdMI9x2l33aDaQQqiMDc9CLfZ+cLt2t SF1Vor/PZAIotaTbVv/+HpnjMrxLWb/s5TZqxaa+b2kJYbsgFsoLQ7Z4+jEKt69jktbD a3MbsgI4n3tBNGYGe/T4+Z+Rhd1tTu9Fw0BhPogzm53i6wmyXkQQzpM8zpJJkBbE2FF6 HRy9a479YZDexEbXyZJi4wgc/J2kTJzyYqGn2RliNXnW48TS8YFNbmsh7OWuMLrGQtYL FJs+tj3xUiKjixegNz+2oGEQYkxW9dn8mcewopc3Wnz3NM5G2vTzKdDfL/tsp3KR0PAJ bLOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=D9fKqMwc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g13-20020a17090ace8d00b0024de12511casi7990457pju.56.2023.05.02.11.08.05; Tue, 02 May 2023 11:08:42 -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=@suse.com header.s=susede1 header.b=D9fKqMwc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234072AbjEBSBW (ORCPT + 99 others); Tue, 2 May 2023 14:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjEBSBV (ORCPT ); Tue, 2 May 2023 14:01:21 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D161E83; Tue, 2 May 2023 11:01:19 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 344D9219DE; Tue, 2 May 2023 18:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1683050478; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+0f0hUbsvSFR9UE93IS6I2zL3LHIPpph9neOljoj1mE=; b=D9fKqMwcb2qgqBv1yX/t/aA1+iNYzYkHC8ljzAS23401NpcT72tQ1UUPhm4T5mPjk9LeE+ FxS1WzcrgEP124Sgfj6zwUF1ZRXILfcmvYFjj+j2XPhHdmpSxxPdVltqCYcH9Phq3Z/J9A KJ1Ekc6Yu3tQ+vei+SkgSkXSJTszLDA= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F0312134FB; Tue, 2 May 2023 18:01:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id U2LJOe1PUWSWbgAAMHmgww (envelope-from ); Tue, 02 May 2023 18:01:17 +0000 Date: Tue, 2 May 2023 20:01:16 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Waiman Long Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Juri Lelli , Valentin Schneider , Frederic Weisbecker Subject: Re: [RFC PATCH 0/5] cgroup/cpuset: A new "isolcpus" paritition Message-ID: References: <1b8d9128-d076-7d37-767d-11d6af314662@redhat.com> <9862da55-5f41-24c3-f3bb-4045ccf24b2e@redhat.com> <226cb2da-e800-6531-4e57-cbf991022477@redhat.com> <60ec12dc-943c-b8f0-8b6f-97c5d332144c@redhat.com> <46d26abf-a725-b924-47fa-4419b20bbc02@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dk2c7how7kjjrmdw" Content-Disposition: inline In-Reply-To: <46d26abf-a725-b924-47fa-4419b20bbc02@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 --dk2c7how7kjjrmdw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello. The previous thread arrived incomplete to me, so I respond to the last message only. Point me to a message URL if it was covered. On Fri, Apr 14, 2023 at 03:06:27PM -0400, Waiman Long = wrote: > Below is a draft of the new cpuset.cpus.reserve cgroupfs file: >=20 > =A0 cpuset.cpus.reserve > =A0=A0=A0=A0=A0=A0=A0 A read-write multiple values file which exists on a= ll > =A0=A0=A0=A0=A0=A0=A0 cpuset-enabled cgroups. >=20 > =A0=A0=A0=A0=A0=A0=A0 It lists the reserved CPUs to be used for the creat= ion of > =A0=A0=A0=A0=A0=A0=A0 child partitions.=A0 See the section on "cpuset.cpu= s.partition" > =A0=A0=A0=A0=A0=A0=A0 below for more information on cpuset partition.=A0 = These reserved > =A0=A0=A0=A0=A0=A0=A0 CPUs should be a subset of "cpuset.cpus" and will b= e mutually > =A0=A0=A0=A0=A0=A0=A0 exclusive of "cpuset.cpus.effective" when used sinc= e these > =A0=A0=A0=A0=A0=A0=A0 reserved CPUs cannot be used by tasks in the curren= t cgroup. >=20 > =A0=A0=A0=A0=A0=A0=A0 There are two modes for partition CPUs reservation - > =A0=A0=A0=A0=A0=A0=A0 auto or manual.=A0 The system starts up in auto mod= e where > =A0=A0=A0=A0=A0=A0=A0 "cpuset.cpus.reserve" will be set automatically whe= n valid > =A0=A0=A0=A0=A0=A0=A0 child partitions are created and users don't need t= o touch the > =A0=A0=A0=A0=A0=A0=A0 file at all.=A0 This mode has the limitation that t= he parent of a > =A0=A0=A0=A0=A0=A0=A0 partition must be a partition root itself.=A0 So ch= ild partition > =A0=A0=A0=A0=A0=A0=A0 has to be created one-by-one from the cgroup root d= own. >=20 > =A0=A0=A0=A0=A0=A0=A0 To enable the creation of a partition down in the h= ierarchy > =A0=A0=A0=A0=A0=A0=A0 without the intermediate cgroups to be partition ro= ots, Why would be this needed? Owning a CPU (a resource) must logically be passed all the way from root to the target cgroup, i.e. this is expressed by valid partitioning down to given level. > one > =A0=A0=A0=A0=A0=A0=A0 has to turn on the manual reservation mode by writi= ng directly > =A0=A0=A0=A0=A0=A0=A0 to "cpuset.cpus.reserve" with a value different fro= m its > =A0=A0=A0=A0=A0=A0=A0 current value.=A0 By distributing the reserve CPUs = down the cgroup > =A0=A0=A0=A0=A0=A0=A0 hierarchy to the parent of the target cgroup, this = target cgroup > =A0=A0=A0=A0=A0=A0=A0 can be switched to become a partition root if its "= cpuset.cpus" > =A0=A0=A0=A0=A0=A0=A0 is a subset of the set of valid reserve CPUs in its= parent. level n `- level n+1 cpuset.cpus // these are actually configured by "owner" of level n cpuset.cpus.partition // similrly here, level n decides if child is a pa= rtition I.e. what would be level n/cpuset.cpus.reserve good for when it can directly control level n+1/cpuset.cpus? Thanks, Michal --dk2c7how7kjjrmdw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCZFFP6gAKCRAkDQmsBEOq uf5WAP0TD4xZbzbRrza4aMPH3HGxMt5QxQoqQyFnCnecSe4ThwEA80+zGnGxZQv9 yMROHtPHn2tZGEg0+1iKitQk/7QCnA0= =hh88 -----END PGP SIGNATURE----- --dk2c7how7kjjrmdw--