Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3229736rwl; Thu, 13 Apr 2023 18:24:55 -0700 (PDT) X-Google-Smtp-Source: AKy350YSjcx7W+TqHn2Ad26Z5NLMAexzUPz5tTTRSqRSck9fqnhlsJ6zwqK4B2WUBshtDxmEIEAf X-Received: by 2002:a17:90b:4d8a:b0:23d:870:5244 with SMTP id oj10-20020a17090b4d8a00b0023d08705244mr4269055pjb.13.1681435495521; Thu, 13 Apr 2023 18:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681435495; cv=none; d=google.com; s=arc-20160816; b=vL2fbLsvLEUxAf3VniN+p9irET6ndLUBJO76Z1nucUUKAkDAV+Oa4XcqgcbLdF0WbA U6+1bVlfl1Zx9ZzLNssZd8Mupw/QH80wj5V6EcR4zSlll8moNqPvxa8rWuUPIHoUAhX3 4ETkj8lNI731xoYNsQaCl7/n8j+L6pCHsD1cyjMkM+1mqBzom5GmBhZfP5Tsc7Dym1nN ouZ2p1OuHCl6UbElUqgjZEwpMj6w+3C+Q0zbbHjKwO1qpC3p9lHVsIGYoAjdQNQMxZrn F5ysODvBRd7F5k2Y5KZUIM6jp1WVhohOr8D/FYUK6Ead+cCSsp4rylgHOQ6hq8ZP8r/5 B8/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=zhMvhm7mcviP5pv7MPTwxWQbVy7/SnaH+sAFoMwChHM=; b=R9Uxn+kVGFFYHPeSl10DhSwl4Y7DJ1diLKQLkG0+vCY7hlB+EtARSeLyKtWlUF7W1b fYIWhTPowwNU6hOv+ZMlFb621DaOWo/t2f2+c3s3BjIi7feqFJL3RTFGrYUYKBQmQO/7 1aaz7+2TsK+FOeLfcZ7VRgkvD0sLYxnlxCyFhOMn0QXQP8lfpRkgLUnRidFI0WsLdbCJ 3aV980jV38R6xIq1z02i3cYgHW2Jm9iBrGI8AEDbruPBvTvDjkrqon/+HN2MouQhw9PD CYdmTKNy0j25gbVsGjBCtqlCsvqM1Z/6EJahdbJHLBm9G9Id8aIwXhRu10PCnC0pGAp+ gRtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hOg2Doen; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020a170902c40e00b001a63a7b7025si3663335plk.30.2023.04.13.18.24.44; Thu, 13 Apr 2023 18:24:55 -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=@redhat.com header.s=mimecast20190719 header.b=hOg2Doen; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbjDNBXR (ORCPT + 99 others); Thu, 13 Apr 2023 21:23:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbjDNBXP (ORCPT ); Thu, 13 Apr 2023 21:23:15 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E48D3A88 for ; Thu, 13 Apr 2023 18:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681435346; 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=zhMvhm7mcviP5pv7MPTwxWQbVy7/SnaH+sAFoMwChHM=; b=hOg2DoeniQerEjSHDo+CgNiN7SN18MpCgM6D8BQ2VGWYxD6tGhPnRsSnEUjjypq0W3AWFu aDlmkjLhM4yU3sZW21djeoXUVa9mC820e76oiOdAx77iTYw2GIj+VhrxfLOo0qvF0FkLsx MIBdb70LuIKgt1qWui+EIkNQegO6UcE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-427-EdtV2y9BN7CoAou49pTNkg-1; Thu, 13 Apr 2023 21:22:21 -0400 X-MC-Unique: EdtV2y9BN7CoAou49pTNkg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 19503101A531; Fri, 14 Apr 2023 01:22:21 +0000 (UTC) Received: from [10.22.32.61] (unknown [10.22.32.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id C943140C6E70; Fri, 14 Apr 2023 01:22:19 +0000 (UTC) Message-ID: <226cb2da-e800-6531-4e57-cbf991022477@redhat.com> Date: Thu, 13 Apr 2023 21:22:19 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [RFC PATCH 0/5] cgroup/cpuset: A new "isolcpus" paritition Content-Language: en-US From: Waiman Long To: Tejun Heo Cc: 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 References: <20230412153758.3088111-1-longman@redhat.com> <1ce6a073-e573-0c32-c3d8-f67f3d389a28@redhat.com> <1b8d9128-d076-7d37-767d-11d6af314662@redhat.com> <9862da55-5f41-24c3-f3bb-4045ccf24b2e@redhat.com> In-Reply-To: <9862da55-5f41-24c3-f3bb-4045ccf24b2e@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 4/12/23 21:55, Waiman Long wrote: > On 4/12/23 21:17, Tejun Heo wrote: >> Hello, Waiman. >> >> On Wed, Apr 12, 2023 at 08:55:55PM -0400, Waiman Long wrote: >>>> Sounds a bit contrived. Does it need to be something defined in the >>>> root >>>> cgroup? >>> Yes, because we need to take away the isolated CPUs from the >>> effective cpus >>> of the root cgroup. So it needs to start from the root. That is also >>> why we >>> have the partition rule that the parent of a partition has to be a >>> partition >>> root itself. With the new scheme, we don't need a special cgroup to >>> hold the >> I'm following. The root is already a partition root and the cgroupfs >> control >> knobs are owned by the parent, so the root cgroup would own the first >> level >> cgroups' cpuset.cpus.reserve knobs. If the root cgroup wants to >> assign some >> CPUs exclusively to a first level cgroup, it can then set that cgroup's >> reserve knob accordingly (or maybe the better name is >> cpuset.cpus.exclusive), which will take those CPUs out of the root >> cgroup's >> partition and give them to the first level cgroup. The first level >> cgroup >> then is free to do whatever with those CPUs that now belong >> exclusively to >> the cgroup subtree. > > I am OK with the cpuset.cpus.reserve name, but not that much with the > cpuset.cpus.exclusive name as it can get confused with cgroup v1's > cpuset.cpu_exclusive. Of course, I prefer the cpuset.cpus.isolated > name a bit more. Once an isolated CPU gets used in an isolated > partition, it is exclusive and it can't be used in another isolated > partition. > > Since we will allow users to set cpuset.cpus.reserve to whatever value > they want. The distribution of isolated CPUs is only valid if the cpus > are present in its parent's cpuset.cpus.reserve and all the way up to > the root. It is a bit expensive, but it should be a relatively rare > operation. I now have a slightly different idea of how to do that. We already have an internal cpumask for partitioning - subparts_cpus. I am thinking about exposing it as cpuset.cpus.reserve. The current way of creating subpartitions will be called automatic reservation and require a direct parent/child partition relationship. But as soon as a user write anything to it, it will break automatic reservation and require manual reservation going forward. In that way, we can keep the old behavior, but also support new use cases. I am going to work on that. Cheers, Longman