Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8703342rwi; Tue, 25 Oct 2022 09:46:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NK2McIAHnw1NN2PfkFdcQlJCBkAWRlfnTc4Zj5poL+yE+HFiueoU1sofKJzWTMlP7PDO6 X-Received: by 2002:a17:906:fe0a:b0:76f:e373:d84b with SMTP id wy10-20020a170906fe0a00b0076fe373d84bmr33527524ejb.297.1666716370906; Tue, 25 Oct 2022 09:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666716370; cv=none; d=google.com; s=arc-20160816; b=yi4JVa9Vt3PXg5i//LbgdcXl0XoiL0Mps2TLAZwN9mh6/r3AEQzlb7c5DdN7SJGsB1 cmpOR0h0jBbnsTcZmBcGkioGbUigH4ht3ElMCRTIZDak8js+JZaGNnR4W+LnyxIemC/s F1f+kf1+qG1SLvUUbHO40HdKJsdC+DPBLW/9gMDJrCw+mid3mNcbf+4vI6rsPEj8a2bb P2b7qPx1YDMhPJHky2mfZDb41o7qUDnEdtsd1h9xo447eZ3YRR28bubtAGB1xtcw+liA EBCGExHnqZMfUxdM3lWpKwo/L1Jx+vd2BntBkqrMolkYYTY2Ii9cCYufeDp2zNmOwC0s yF8A== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=Uip0TDlNsOPANsbU3iC3mzod0bxHhhFH1ibBnGevCmM=; b=Tmxl3U0IV4HLUlz9I0SDM++tOiu1A6wjHUBkqhsonFPIEEqZXvQVOINQXqODVg5xMu V6Pjhp4jCOQFf+9jM03PEGenzL+I9X9WTpKkdQBfVuktFBGMm49G2qeTU1IOtM6bt8aD tDvGwKKsIVtckMlGxM2MqDIN+SVImsulsJ06nsqn8J2kh0ov1EJ6jVzPVIGFv4+LpumW oeZqFinEUjMU5nCG+YbFuhSRvzJitfW8Oe/PtC3EokgZW5HwoCgvg/9xtmRVm0l7Ij/c hkk4l/e+qcvtsM3BJ/+H/Vvq4wActQJHjlGm783D/2SXhZ3HuIwBbEkIKrxRyQzkBsc7 lXng== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a056402510a00b0045cba2d74c3si3754214edd.541.2022.10.25.09.45.44; Tue, 25 Oct 2022 09:46: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232297AbiJYP4m (ORCPT + 99 others); Tue, 25 Oct 2022 11:56:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232280AbiJYP4X (ORCPT ); Tue, 25 Oct 2022 11:56:23 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB62217A94A for ; Tue, 25 Oct 2022 08:56:21 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 81F6DD6E; Tue, 25 Oct 2022 08:56:27 -0700 (PDT) Received: from [10.1.197.78] (unknown [10.1.197.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D5C0F3F71A; Tue, 25 Oct 2022 08:56:19 -0700 (PDT) Message-ID: Date: Tue, 25 Oct 2022 16:56:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [RFD] resctrl: reassigning a running container's CTRL_MON group Content-Language: en-GB To: Peter Newman , Reinette Chatre Cc: Tony Luck , "Yu, Fenghua" , "Eranian, Stephane" , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Babu Moger , Gaurang Upasani References: <81a7b4f6-fbb5-380e-532d-f2c1fc49b515@intel.com> <7b09fb62-e61a-65b9-a71e-ab725f527ded@intel.com> From: James Morse In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 Hi Peter, On 21/10/2022 11:09, Peter Newman wrote: > On Thu, Oct 20, 2022 at 9:08 PM Reinette Chatre > wrote: >> >> If the expectation is that PARTID counts are very high then how about >> a solution where multiple PARTIDs are associated with the same CTRL_MON group? >> A CTRL_MON group presents a resource allocation to user space, CLOSIDs/PARTIDs >> are not exposed. So using multiple PARTIDs for a resource group (all with the >> same allocation) seems conceptually ok to me. (Please note, I did not do an >> audit to see if there are any hidden assumption or look into lifting required >> to support his.) > I did propose using PARTIDs to back additional mon_groups a few days ago > on the other sub-thread with James. My understanding was that it would > be less trouble if the user opted to do this on their own rather than > the kernel somehow doing this automatically. > > https://lore.kernel.org/all/835d769b-3662-7be5-dcdd-804cb1f3999a@arm.com/ > So perhaps we can just arrive at some way to inform the user of the > difference in resources. We may not even need to be able to precisely > calculate the number of groups we can create, as the logic for us could > be a simple as: > > 1) If num_closids >= desired job count, just use CTRL_MON groups > 2) Otherwise, fall back to the proposed mon_group-move approach if > num_rmids is large enough for the desired job count > To address the glitchy behavior of moving a PMG to a new PARTID, I found > that the MPAM spec says explicitly that a PMG is subordinate to a > PARTID, so I would be fine with James finding a way for the MPAM driver > to block the rename operation, because it's unable to mix and match > RMIDs and CLOSIDs the way that RDT can. I'd like to support moving groups of tasks in a sensible way on MPAM too. I don't think we should conflate it with 'old counters keep counting' - that should be exposed as a separate property that influences how user-space sets this stuff up. Thanks, James