From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755630AbcL0UAX (ORCPT ); Tue, 27 Dec 2016 15:00:23 -0500 Received: from mga01.intel.com ([192.55.52.88]:30925 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752214AbcL0UAM (ORCPT ); Tue, 27 Dec 2016 15:00:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,418,1477983600"; d="scan'208";a="43720781" From: Andi Kleen To: Shivappa Vikas Cc: Peter Zijlstra , Vikas Shivappa , linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, davidcc@google.com, eranian@google.com, hpa@zytor.com Subject: Re: [PATCH 01/14] x86/cqm: Intel Resource Monitoring Documentation References: <1481929988-31569-1-git-send-email-vikas.shivappa@linux.intel.com> <1481929988-31569-2-git-send-email-vikas.shivappa@linux.intel.com> <20161223123228.GQ3107@twins.programming.kicks-ass.net> <20161223203318.GU3107@twins.programming.kicks-ass.net> Date: Tue, 27 Dec 2016 12:00:11 -0800 In-Reply-To: (Shivappa Vikas's message of "Sat, 24 Dec 2016 17:51:14 -0800 (PST)") Message-ID: <87vau5gn1w.fsf@firstfloor.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Shivappa Vikas writes: > > Ok , looks like the interface is the problem. Will try to fix > this. We are just trying to have a light weight monitoring > option so that its reasonable to monitor for a > very long time (like lifetime of process etc). Mainly to not have all > the perf scheduling overhead. That seems like an odd reason to define a completely new user interface. This is to avoid one MSR write for a RMID change per context switch in/out cgroup or is it other code too? Is there some number you can put to the overhead? Or is there some other overhead other than the MSR write you're concerned about? Do you have an ftrace or better PT trace with the overhead before-after? Perhaps some optimization could be done in the code to make it faster, then the new interface wouldn't be needed. FWIW there are some pending changes to context switch that will eliminate at least one common MSR write [1]. If that was fixed you could do the RMID MSR write "for free" -Andi [1] https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/log/?h=x86/fsgsbase