From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756321AbdCGUmW (ORCPT ); Tue, 7 Mar 2017 15:42:22 -0500 Received: from mga14.intel.com ([192.55.52.115]:58666 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756265AbdCGUmP (ORCPT ); Tue, 7 Mar 2017 15:42:15 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,258,1486454400"; d="scan'208";a="65177984" From: Vikas Shivappa To: vikas.shivappa@intel.com, tony.luck@intel.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, ravi.v.shankar@intel.com, fenghua.yu@intel.com, andi.kleen@intel.com, davidcc@google.com, eranian@google.com, vikas.shivappa@linux.intel.com Subject: [PATCH 1/1] x86/cqm: Cqm requirements Date: Tue, 7 Mar 2017 09:49:24 -0800 Message-Id: <1488908964-30261-1-git-send-email-vikas.shivappa@linux.intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sending the cqm requirements as per Thomas comments in the previous verson of cqm patch series - https://marc.info/?l=linux-kernel&m=148374167726502 This is modified version of requirements sent by Tony in the same thread with inputs from David and Stephan. Reviewed-by: Tony Luck Reviewed-by: David Carrillo-Cisneros Reviewed-by: Yu Fenghua Reviewed-by: Stephane Eranian Signed-off-by: Vikas Shivappa General 1) Able to measure all RDT events (currently L3 occupancy, Total B/W, Local B/W). 2) Report separate results per domain (currently L3 caches only). 3) Able to keep track of occupancy without requiring the creation of a perf_event (avoid overhead of perf_events on ctxsw) Thread Monitoring 4) Measure per thread, including kernel threads. 5) Put multiple threads into a single measurement group. No need for cgroup-like hierarchy in measurement group. 6) Newly forked threads inherit parent's measurement group. CAT/Allocation based monitoring 7) Able to monitor an existing resctrl CAT group (threads and cpus) 8) Can get measurements for subsets of tasks in a CAT group (to find the threads hogging the resources). Interface 9) Interface should be extensible to support changes of CLOSID in measurement groups without affecting correctness of pre-existing measurement groups. (See use case 5). 10) Interface should be extensible to work with perf's kernel API and be compatible "as far as practical" with perf tool. 11) Interface should be extensible to support perf-like CPU filtering (i.e. measure for all threads that run in a CPU, regardless of allocation group). Use cases: --------- 1) use RDT to size jobs cache footprint to drive CAT partition sizing 2) Once CAT partition established, monitor actual resource usage of jobs inside that partition, find resource hog or resize CAT partition Change job's CAT partition without affecting monitoring. This is useful when allocation requirements for a task group changes dynamically and the number of distinct task groups is larger than the number of CLOSIDs. 3) Monitoring real time tasks. These may include tasks belonging to default CAT group but run on a set of CPUs. 4) Monitor all allocations on a CPU. 5) When the number of desired allocation groups is less than number of available CLOSIDs, jobs with different dynamic allocation needs may be combined into the same allocation group. If dynamic allocation needs of one of the jobs change, the job will change to a different allocation group. Monitoring of these jobs should remain correct during allocation group moving.