Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp917362rwb; Wed, 9 Nov 2022 10:10:39 -0800 (PST) X-Google-Smtp-Source: AMsMyM7JzQaOLTxyQdv090hDSUAAO8TtnLx/XWDPYAn7DUz85Gkzp0SiEeHJ6o2YizuPV42IS45a X-Received: by 2002:a17:90b:1a81:b0:213:f71d:4895 with SMTP id ng1-20020a17090b1a8100b00213f71d4895mr51290964pjb.213.1668017439264; Wed, 09 Nov 2022 10:10:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668017439; cv=none; d=google.com; s=arc-20160816; b=HhkLqS39JydUhm1mXjR1hVUyYfeba58Tjq/wDVUC5c9M/MSzC1B+wVDd51Ghd4DEf4 rmVifJYasBN1Q/nmsiJg1Sl7aqX7FuoSpR09eWpau7MEP4mVYzynaMy5DK/oTyUlophs WV+WRE6gYyhfBh0oTTTgZhAJ7RRzcBUwXj1rxWPShMFsa1YnRAKImvvYkIt5WnUOTjbP eOrq57Abdn90Wf1HwNRRuc8eNyMhc1PNa8Xqa1TMHBvHNRgP17SJPu96NUXkDRRWrihc BQUffYBLIcPjfh2o8WwN9bvMFToakhbgv9zYpA48FP2yM3UjoewY0TtJZS3n8ZNQTnOT kn+w== 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=tVWd+NK+EcgqK+0r1bQK06N1Og6jdQSUQdAp+EizDxc=; b=ZyjO++KUyO/UUlmQRk8I//Z+Hk60cszqbEAcClie3SOexVreReYmbHhqwW4KSh0/0E bVlPYacdSyii0OI9ItZfIRoONO9MfQVaON3do1EdQ+RblZqcypMMlDgYTI2zGXo+L5hS PEFneNW4fgcNP3ttj39J3We5dcDLeWZSaxVtc6EhagLCW74pm4Ry6bMhE6713f9amvjn 4pK9w6DSgQHichxVYr13Is7QMMTzr0iC3qUTib7sDpdbridJx8Q44JLqas05zjw64K5H A6V/JgNYvu5bbZRBK4U6RcgaS9sNn1o67FvLPzmDHeUNXmDbffLZtB5j8d5GRYxn8UXi ohYw== 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 e14-20020a056a001a8e00b0056bc64d158csi20151988pfv.172.2022.11.09.10.10.26; Wed, 09 Nov 2022 10:10:39 -0800 (PST) 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 S230265AbiKISCX (ORCPT + 94 others); Wed, 9 Nov 2022 13:02:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230216AbiKISCQ (ORCPT ); Wed, 9 Nov 2022 13:02:16 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C41F41FF8D for ; Wed, 9 Nov 2022 09:58:55 -0800 (PST) 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 B568F1FB; Wed, 9 Nov 2022 09:59:01 -0800 (PST) Received: from [10.1.197.38] (eglon.cambridge.arm.com [10.1.197.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1D7393F703; Wed, 9 Nov 2022 09:58:54 -0800 (PST) Message-ID: Date: Wed, 9 Nov 2022 17:58:47 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [RFD] resctrl: reassigning a running container's CTRL_MON group Content-Language: en-GB To: Reinette Chatre , "Luck, Tony" , Peter Newman Cc: "Yu, Fenghua" , "Eranian, Stephane" , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Babu Moger , Gaurang Upasani References: <81a7b4f6-fbb5-380e-532d-f2c1fc49b515@intel.com> <76bb4dc9-ab7c-4cb6-d1bf-26436c88c6e2@arm.com> <835d769b-3662-7be5-dcdd-804cb1f3999a@arm.com> <09029c7a-489a-7054-1ab5-01fa879fb42f@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 Reinette, Tony, On 08/11/2022 23:18, Reinette Chatre wrote: > On 11/8/2022 1:56 PM, Luck, Tony wrote: >>> Looking at some history there even seems to have been some work surrounding >>> "rotating" of RMIDs that seem related to what you mention above: >>> >>> commit bff671dba7981195a644a5dc210d65de8ae2d251 >>> Author: Matt Fleming >>> Date: Fri Jan 23 18:45:47 2015 +0000 >>> >>> perf/x86/intel: Perform rotation on Intel CQM RMIDs >>> >>> There are many use cases where people will want to monitor more tasks >>> than there exist RMIDs in the hardware, meaning that we have to perform >>> some kind of multiplexing. >> >> That would work for monitoring memory bandwidth. But not for LLC occupancy >> as there's no way to set an occupancy counter to the value of what the new set of >> processes are using. So you'd have to live with nonsense values for a potentially >> long time until natural LLC evictions and re-fills sorted things out. Either that or >> flush the entire LLC when reassigning an RMID so you can count up from zero >> as the cache is re-filled. > > Tony helped me to find some more history here. Please see the commit message > of the patch below for some information on why the perf support was removed. > This is not all specific to monitoring of cache occupancy. Thanks! I'll be sure to cite this in the future perf support, and check I've covered all the issues described here. James > commit c39a0e2c8850f08249383f2425dbd8dbe4baad69 > Author: Vikas Shivappa > Date: Tue Jul 25 14:14:20 2017 -0700 > > x86/perf/cqm: Wipe out perf based cqm