Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1113536rwr; Fri, 5 May 2023 09:16:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6RI2L9B8VIjUl8QRJOz4abq8MG8RHVVdfzGRg4+/9cWUZgp7QSaHmI+d7zR2kK+1KI6yH2 X-Received: by 2002:a17:90b:3609:b0:247:2437:d5c4 with SMTP id ml9-20020a17090b360900b002472437d5c4mr2097389pjb.13.1683303370256; Fri, 05 May 2023 09:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683303370; cv=none; d=google.com; s=arc-20160816; b=r+LZfHh8nqcqK01cuTFiulhqUf97hVcdslUl0d8BcpaDfaECpEygeqHAN0QxnDYCXk RElOejZdLjZFtqPLwoi2kEdy/iWsb8ktD+5iQfV/fngmY8vzAj8K8Shg25aphxQQuZWg JF8U5UpJrv+DPq5U6kgMwoqPMscGSv+jcsBUG65Qo1CZQNBEkjtisQQX8Kh/FZVkOxSF Rp+Zh5nwd+eL42OXvs0yrZ/BUyRhUHx+LuN048NANDVw8TVgs6DqRjffWmAfZYFwuUay b8Tp7zcxswfuhAaFZ5cLwLTz1iaftjmw6lzp5p32qmNON4UMIxH0ewmqd2pgKsvo4Us7 Po3A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=zQKJTg5ApR448/3rL3jZGIW7r7Tt+TftEzg/PrUenB8=; b=Sre25jy7geTZ+YFasTsfHqNTX54/epe71uPmIetyGmk11/kiKYKdJUd4YcsuSBoAPU EAApSkw232ErNDG3/KdrymrthbnKQ1EA9EQlx1lCpNDqaLjUXn+8e9rxizLY7Utj/UYO lIVnZV8tx5mC40eUGHij/VOhn0S0n6VxdEOItrhuSZpgR2vZyrMK6Rohi2NThvZiw3D2 jsbE9xC7zoQcvCj6sANiiGw1PxzXidDRldxRFyS8XFoTRC3Sof2lNxbw2MhH0K9O4BTY X7cakFafH2lYmXxE7/V2Y1guCMz+kKB2DmWEY6G+o8S7KynEG61Rcl+MP/nc6Z8sxek2 N1JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=KdeViUdQ; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl12-20020a17090b384c00b00247ad11b6d3si21116878pjb.88.2023.05.05.09.15.57; Fri, 05 May 2023 09:16:10 -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=@gmail.com header.s=20221208 header.b=KdeViUdQ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232695AbjEEQD4 (ORCPT + 99 others); Fri, 5 May 2023 12:03:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231852AbjEEQDy (ORCPT ); Fri, 5 May 2023 12:03:54 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4A91637D; Fri, 5 May 2023 09:03:52 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6439df6c268so712504b3a.0; Fri, 05 May 2023 09:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683302632; x=1685894632; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=zQKJTg5ApR448/3rL3jZGIW7r7Tt+TftEzg/PrUenB8=; b=KdeViUdQB/XlTtwKjiqtdqzxGXJNnUwIDquRJ+lSj2VGU9tE1P0MAkcVPmNkcz6vHB fDXCRHapjvFVEV3o1VGhvwLDLqnYkDZk590OXp4RU/dg1K9J4irJGis253sNeWuqWAHu N/LRTdnrS4B20Cwt15aQB3erb35WH+otXfr8XUrmfXJ5F0YNoIEPGGTqcVdo6AqE2RYy J7XuI0QXsJZknjLlLhZHvKE2H0pbe5RlsDzZgofl+XV4kim3baGkMM9j0zEi/klPxtaQ onIuV02H251+0B0rKEGb09NzWZixob41Xeurhro2dcypBvg34lEmo7vXh51YUQDZ8RoK gZmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683302632; x=1685894632; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zQKJTg5ApR448/3rL3jZGIW7r7Tt+TftEzg/PrUenB8=; b=GTV0qp6FaGmPvFv3RTQzaYPCHbR7md7FnKfQzYIoVfnp+VCaZBNukhaSODfWDSHGl/ 1twdFFz4rn3bRzvcqe1GBAQXCjl3zz6qp0p2zR5qE9pFHJWEuCYUH2RqJlNDdtR0YRkR bqwk7COcxxGB4Ojd+40etKmXA1ojhtcnaaN8eMpBfCVWCwMqBFnfkmpJJo3eF6Q0TxF6 VBfd7JMuig3Ruj2m/LPshZ+T6UFEP8beOvPaBno9aoyfzIOvAwk0SvmX2V7pK05YVZ7N AYoWimlU+Ni+XsPQkCTnxSOOvvKxDKQxaIpX9UQ6sZkkxr5ctp7OF0Bplezy82vAcpFd qu4g== X-Gm-Message-State: AC+VfDzP7qfgSVZ7Z/JVSHV7wJUCtv1dPM6ImmgJKk4wyKzkqyCxcA4t PyeKlucpOT90Ln3Afay4J7c= X-Received: by 2002:a17:902:a5c6:b0:1aa:d706:e0e5 with SMTP id t6-20020a170902a5c600b001aad706e0e5mr1732585plq.47.1683302631602; Fri, 05 May 2023 09:03:51 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id d7-20020a170902c18700b001a04d27ee92sm1938725pld.241.2023.05.05.09.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 09:03:49 -0700 (PDT) Sender: Tejun Heo Date: Fri, 5 May 2023 06:03:48 -1000 From: Tejun Heo To: Waiman Long Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , 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: <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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Wed, May 03, 2023 at 11:01:36PM -0400, Waiman Long wrote: > > On 5/2/23 18:27, Michal Koutný wrote: > > On Tue, May 02, 2023 at 05:26:17PM -0400, Waiman Long wrote: > > > In the new scheme, the available cpus are still directly passed down to a > > > descendant cgroup. However, isolated CPUs (or more generally CPUs dedicated > > > to a partition) have to be exclusive. So what the cpuset.cpus.reserve does > > > is to identify those exclusive CPUs that can be excluded from the > > > effective_cpus of the parent cgroups before they are claimed by a child > > > partition. Currently this is done automatically when a child partition is > > > created off a parent partition root. The new scheme will break it into 2 > > > separate steps without the requirement that the parent of a partition has to > > > be a partition root itself. > > new scheme > > 1st step: > > echo C >p/cpuset.cpus.reserve > > # p/cpuset.cpus.effective == A-C (1) > > 2nd step (claim): > > echo C' >p/c/cpuset.cpus # C'⊆C > > echo root >p/c/cpuset.cpus.partition > > It is something like that. However, the current scheme of automatic > reservation is also supported, i.e. cpuset.cpus.reserve will be set > automatically when the child cgroup becomes a valid partition as long as the > cpuset.cpus.reserve file is not written to. This is for backward > compatibility. > > Once it is written to, automatic mode will end and users have to manually > set it afterward. I really don't like the implicit switching behavior. This is interface behavior modifying internal state that userspace can't view or control directly. Regardless of how the rest of the discussion develops, this part should be improved (e.g. would it work to always try to auto-reserve if the cpu isn't already reserved?). Thanks. -- tejun