Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1095066rwb; Wed, 26 Jul 2023 07:32:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCcxlpYPqJ5QIhrlGmaX6CRHQ1HFFbQQ99wz4EnR5rIuH/9H7W3Q8N45UMicOMVilEGZmd X-Received: by 2002:a05:6a20:7d87:b0:12c:e2f6:e39 with SMTP id v7-20020a056a207d8700b0012ce2f60e39mr2327368pzj.7.1690381927992; Wed, 26 Jul 2023 07:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690381927; cv=none; d=google.com; s=arc-20160816; b=ZmZqXlL5G/JrRdJM/R8PNckfjl3LlNL7j9I9sIRC68s/2wxbJHzx9mCLp3QNssuKK+ NB4ZDK3ur+GyjARriL4nzdpI5gN9DdSSuDWZQ2pLvGHBRxvFp0Jeuf4JEsS3aeLoPP2D +L7e5Dma6OSAkN7U+rrER2gAM4tlfbcpSLMt2nTufP+k9SXnfTH0Z6pHxOka5ejeBL3Q TR5yvSlx4CrvPa0Ou0R4xyoPYXssnJwQzIrJLBAnPHBZuwfCNgi1TnFW5uGLUYSM6gh3 1efHbcjY5oAmvqELskIm9+xtaezoFpJSF6VqHsnsC3O/oNhoWLGa53BAafsk34HQItMd F8dA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6NNMtDcgI6ISsX1hHVTy2Hcd6zLeVhUYbNQxkQCFbqA=; fh=R1eq++VqxrkUJtGhDBTb3SNWWap/kWdibAfcpJCqYGQ=; b=hB1EXcrNmpgBZhBWWKWhfHsqYnx2Zb37dLR3A6qm2AZ3KEzxZ7jp7duipain356heZ 8x6Iz6G86GzzPbxdAVY9c8bhRtf5LviKdNV+KnYC7di6kapAnBv5uHbUqP/c7n0fJfaR GnJc92Fj04PTiSB9X70gvRSY7s8DuF0K184Y4/rBsiPWoZvs7h5roc5NMgacVipjxXRf ISbFochFfU/fkwW5iHTmQm4riMUT+eS3rhEBUZOz7WQLwCS7fkUgMEjMEd56LnYirAPe FSb7aua12kiRGL2jo3cu4FZlzSZCjSILsNKoSdPYLd1oS7Cd8dTMnAGiY5P8hmgvd7uN MBBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VmUNi8VP; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 137-20020a63018f000000b005634b43d2d9si12703469pgb.458.2023.07.26.07.31.51; Wed, 26 Jul 2023 07:32:07 -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=@intel.com header.s=Intel header.b=VmUNi8VP; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233550AbjGZNwx (ORCPT + 99 others); Wed, 26 Jul 2023 09:52:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233100AbjGZNww (ORCPT ); Wed, 26 Jul 2023 09:52:52 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FC58F3 for ; Wed, 26 Jul 2023 06:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690379571; x=1721915571; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xvBkwY7sxuWl/Al5gD7mazKVZkI/LarItDLpbbjPsSg=; b=VmUNi8VPfQtLBH5EPRxO4wlAJ/4StfPhCNgYDO1ZdZ171OTJoz7ZDqOr yFoae9XxAe+LST9OFI0liR2gGm5bMSU1t8UwJU6rZRlkF2wzSNqUAVZDa zWVC6UpQzfhQARgCXDgCIrLH2c6Q6K3xcjRZZ/PV8zwTFx0M3xlmq46Cf 8N20SSWZZ+hfgYKVHXDPSCvK+FtQTgGfCo7EG1Q7spPDW/CXjMnXJjzbS LxM22cC70f0oDhDCx10VGKCeYyWWKEy9xNsmWnjCo6h26C3JGO5DI9NMX WgC9+SasWWiGoz4/z2OwwWP7MC55zdQnZ/s/N6XgXAzsnp7fDo9R+Pe9Z Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="352922608" X-IronPort-AV: E=Sophos;i="6.01,232,1684825200"; d="scan'208";a="352922608" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2023 06:52:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="796587548" X-IronPort-AV: E=Sophos;i="6.01,232,1684825200"; d="scan'208";a="796587548" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.74]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2023 06:52:50 -0700 Date: Wed, 26 Jul 2023 06:52:48 -0700 From: Tony Luck To: Drew Fustini Cc: James Morse , "Yu, Fenghua" , "Chatre, Reinette" , Babu Moger , Peter Newman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , "shameerali.kolothum.thodi@huawei.com" , D Scott Phillips OS , "carl@os.amperecomputing.com" , "lcherian@marvell.com" , "bobo.shaobowang@huawei.com" , "tan.shaopeng@fujitsu.com" , "xingxin.hx@openanolis.org" , "baolin.wang@linux.alibaba.com" , Jamie Iles , Xin Hao , "Pitre, Nicolas" , Kevin Hilman , "aricciardi@baylibre.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "patches@lists.linux.dev" Subject: Re: [RFC PATCH 0/2] Resctrl - rewrite (WIP) Message-ID: References: <20230620033702.33344-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Tue, Jul 25, 2023 at 07:27:25PM -0700, Drew Fustini wrote: > I have access to a Xeon Silver 4310 machine which reports to have > cat_l3, cqm_mbm_local, cqm_mbm_total and mba. > > I would like to test resctrl2 on it so I can better understand how it > works. I think that will help me understand how to adapt the RISC-V > CBQRI resctrl proof-of-concept to use resctrl2. > > Would you be able to provide an example of how you loaded the necessary > resctrl2 kernel modules? Drew, Sure. You simply mount the filesystem, and then load modules for whichever features you'd like to use. This will enable everything you list above: # mount -t resctrl resctrl /sys/fs/resctrl # modprobe rdt_l3_cat # modprobe rdt_llc_occupancy # modprobe rdt_mbm_local_bytes # modprobe rdt_mbm_total_bytes # modprobe rdt_l3_mba There are some experimental extras. E.g. # modprobe rdt_mbm_total_rate # modprobe rdt_mbm_local_rate Will each add an extra file to the mon_data directories to report the data rate in MB/s. The value reported is calculated by the once-per-second counter roll-over code in the kernel. So it might be up to one second out of date, but it is very cheap to read since it doesn't involve MSR access (or cross processor interrupts if you are reading from a CPU in a different scope). You can unload modules without unmounting the filesystem and load different ones to get different data/control. E.g. to switch from L3CAT to L3CDP (which you don't list as supported, so this may not work for you: # rmmod rdt_l3_cat # modprobe rdt_l3_cdp Or to switch from the default MBA that uses percentages to specify throttling to the MBM->MBA feedback code that uses MB/s in the schemata file: # rmmod rdt_l3_mba # modprobe rdt_l3_mba_MBps > > Also, is resctrl2_v65rc1 the latest to branch to test? Yes. That's the latest. There haven't been any updates for a few days because I'm working on a module to support pseudo-locking. I'm half-way there (can do most of the bits to set a group into pseudo-locked mode ... about to work on the cleanup when the group is removed, the filesystem unmounted, or the module unloaded). -Tony