Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2378951rwi; Fri, 21 Oct 2022 03:14:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5WUM268BGh6QPdY/H7FjUdv6TJBhs0evFPf667Ed8vQyKjlKxKYYW9008HPtyBn1QvsO6w X-Received: by 2002:a17:907:daa:b0:78d:9bc9:7d7a with SMTP id go42-20020a1709070daa00b0078d9bc97d7amr14564095ejc.567.1666347278784; Fri, 21 Oct 2022 03:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666347278; cv=none; d=google.com; s=arc-20160816; b=xe36vnKSYcaBTf4VP3OqpFgxrW5zhtGdtUqZ/vhhN3+dItv0dkHyoFqnSAILsJLzr9 IYRQ58Uqtr1CNbTgocYlcK2+PpDrE/NIYXee+7qQYbiXWRU6N6SfGwNWQ8Txdeo+Z903 wHcOAlo0/oyysJrCOjxLbTXAoUdT82n7c+IqoXlph05NFBg60ReHAzfaVLtSlSv2bHY/ cCzScCNJCJqIGqq6ML3XfFd5kLw0JvIvlXkf0CyymwWYxVYGWHQWG2wexGiE3Fa75J7y PJCfR5ed0R3Lsax6O4jWMoBh/dVNebA4B4c7bxe7UcjiTxCPRG4YLsytObd2rGx2NdYI 4jEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+U9a6YuhyIQiRBIX0oFL2SCc+9ZE5crohQW0iwuFYyc=; b=OZzVJcJcI3HKIpJsJGskIjSBRrHIyhuuDZAAtwnDI7j1SwQ4k1BsxF6ZJAq+7TS2vW jB5tvQy3oxS7g6E+NjtNkUdnw3KjLRb1kv+qbUfTZRhHBvQ6+AcIonzyoza6C6ulZeV+ ntJmb3WtbA4ZaX9+pXqv1TbSZM/4bf6zeGOVdackrJ+pMDehAKZXeN65DEyJcC94hVEZ yhm8hIM3kWfuWVMyXRuLz49CpPm8OX61MWYTShWswB5w2I64xq/30UfUgQBNrVyT7owt 59AjVnzX1BtYDaqJjelkF//ZQoSf26itjwHPwQooqgxNrnmuixvloJUpov80VlpECH+M TbfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RtF17LXw; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rs8-20020a170907036800b0078306c5c48asi15817375ejb.250.2022.10.21.03.14.13; Fri, 21 Oct 2022 03:14:38 -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=@google.com header.s=20210112 header.b=RtF17LXw; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbiJUKJs (ORCPT + 99 others); Fri, 21 Oct 2022 06:09:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230289AbiJUKJp (ORCPT ); Fri, 21 Oct 2022 06:09:45 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31578437E3 for ; Fri, 21 Oct 2022 03:09:44 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id 63so2794588ybq.4 for ; Fri, 21 Oct 2022 03:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+U9a6YuhyIQiRBIX0oFL2SCc+9ZE5crohQW0iwuFYyc=; b=RtF17LXw0yc8ZnIZp+gjq4cxOCf52YSR1UHiUaBUuXk7HOGzpgbh5hHEskGPYTLziw rVX5Us51zP2ZKFRfH+AcZoY7M8IMjmSWpOfcVnSmJBYRpgnBFqTQrY8dC25lXuDyNI/3 6W8NtiVYZgPTnrwM6TzJo4HRt1b5VYZa70T164vF6rhOYe4XDApumUIc5VfAS7wmLNm1 slB9BXge/Ty26kCV9EJkpfuOJIOsQmg5kvM5p02bEgl4zdYJJFMKKvhU7NVcpPzVq4vq m+lyr0bHNWj4iblQ55hSP28Ft9qCFl4zuCUQbjMFMmnXTlx8d74Cc8C2V9bwUCLw0am+ sjNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+U9a6YuhyIQiRBIX0oFL2SCc+9ZE5crohQW0iwuFYyc=; b=piD6XX0TO0CWu0S74gY5c8VLkqyGyIvAdjaLwbiikUWQVBMCvILxRzQJ4gOkk8nOQn awd6XWEPfqiyuoNBhvPgqUpH5SgpI7FQWXpwQ+C5Qk/zCRghwSJPBxaxlXkTr0YXsMIU wmJZRvK2ZVompTjwxQAlij2vS+QS4RRnfbSQQ9WjqQ9758xFdeRFqf62H/uCwtDDomgR +nHGl7PWWHJxNVkOgQRWiQ/IlxzzuGQPvQhcqvM0zBLbMEhYzdrP1aSzweRUG6xXtTsK xCqkxtKbht9ZNKHJGplGJ3A093T9Lz1Lpz0BVklFN4vdSmVFUy7Ew8aKYqS2y32xPeEL 3ayQ== X-Gm-Message-State: ACrzQf3PTWM6pY/J2m1z6XLGE94KlljZqx1iIL3QNt13+76LWER+vSeK O/HVDLhB39IFWwr0tT0B+dD2nB5wkL5SzsPp4bInuQ== X-Received: by 2002:a5b:542:0:b0:6ca:1d54:fec8 with SMTP id r2-20020a5b0542000000b006ca1d54fec8mr8653609ybp.45.1666346983310; Fri, 21 Oct 2022 03:09:43 -0700 (PDT) MIME-Version: 1.0 References: <81a7b4f6-fbb5-380e-532d-f2c1fc49b515@intel.com> <7b09fb62-e61a-65b9-a71e-ab725f527ded@intel.com> In-Reply-To: From: Peter Newman Date: Fri, 21 Oct 2022 12:09:32 +0200 Message-ID: Subject: Re: [RFD] resctrl: reassigning a running container's CTRL_MON group To: Reinette Chatre Cc: Tony Luck , "Yu, Fenghua" , "Eranian, Stephane" , "linux-kernel@vger.kernel.org" , Thomas Gleixner , James Morse , Babu Moger , Gaurang Upasani Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 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. -Peter