From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751477AbdBBBTW (ORCPT ); Wed, 1 Feb 2017 20:19:22 -0500 Received: from one.firstfloor.org ([193.170.194.197]:50783 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751409AbdBBBTV (ORCPT ); Wed, 1 Feb 2017 20:19:21 -0500 Date: Wed, 1 Feb 2017 17:19:18 -0800 From: Andi Kleen To: David Carrillo-Cisneros Cc: Andi Kleen , "Luck, Tony" , Thomas Gleixner , Vikas Shivappa , "Shivappa, Vikas" , Stephane Eranian , linux-kernel , x86 , "hpa@zytor.com" , Ingo Molnar , Peter Zijlstra , "Shankar, Ravi V" , "Yu, Fenghua" , "Kleen, Andi" , "Anvin, H Peter" Subject: Re: [PATCH 00/12] Cqm2: Intel Cache quality monitoring fixes Message-ID: <20170202011918.GC26852@two.firstfloor.org> References: <1484879563-29977-1-git-send-email-vikas.shivappa@linux.intel.com> <3908561D78D1C84285E8C5FCA982C28F3A2A8947@ORSMSX114.amr.corp.intel.com> <87inotjupi.fsf@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > I'm not sure this is a real requirement. It's just an optimization, > > right? If you can assign policies to threads, you can implicitly set it > > per CPU through affinity (or the other way around). > > That's difficult when distinct users/systems do monitoring and system > management. What if the cluster manager decides to change affinity > for a task after the monitoring service has initiated monitoring a CPU > in the way you describe? Why would you want to monitor a CPU if you don't know what it is running? The results would be meaningless. So you really want to integrate those two services. > > > The only benefit would be possibly less context switch overhead, > > but if all the thread (including idle) assigned to a CPU have the > > same policy it would have the same results. > > I think another of the reasons for the CPU monitoring requirement is > to monitor interruptions in CPUs running the idle thread. In CAT, idle threads are just threads, so they could be just exposed to perf (e.g. combination of pid 0 + cpu filter) > Also, if perf's like monitoring is supported, it'd allow something like > > perf stat -e LLC-load,LLC-prefetches,intel_cqm/total_bytes -C 2 This would work without a special API. -Andi