From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0253C0015E for ; Wed, 26 Jul 2023 13:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233646AbjGZNwy (ORCPT ); Wed, 26 Jul 2023 09:52:54 -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: 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