Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752808AbcD2UV1 (ORCPT ); Fri, 29 Apr 2016 16:21:27 -0400 Received: from mga11.intel.com ([192.55.52.93]:54956 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752511AbcD2UV0 (ORCPT ); Fri, 29 Apr 2016 16:21:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,553,1455004800"; d="scan'208";a="795292241" Date: Fri, 29 Apr 2016 13:21:12 -0700 (PDT) From: Vikas Shivappa X-X-Sender: vikas@vshiva-Udesk To: David Carrillo-Cisneros cc: Peter Zijlstra , Alexander Shishkin , Arnaldo Carvalho de Melo , Ingo Molnar , Vikas Shivappa , Tony Luck , Stephane Eranian , Paul Turner , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 25/32] sched: introduce the finish_arch_pre_lock_switch() scheduler hook In-Reply-To: Message-ID: References: <1461905018-86355-1-git-send-email-davidcc@google.com> <1461905018-86355-26-git-send-email-davidcc@google.com> <20160429085233.GV3408@twins.programming.kicks-ass.net> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1684 Lines: 43 On Fri, 29 Apr 2016, David Carrillo-Cisneros wrote: > (Re-sending in plain text) > > This hook is used in the following patch in the series to write to > PQR_ASSOC_MSR, a msr that is utilized both by CQM/CMT and by CAT. > Since CAT is not dependent on perf, I created this hook to start CQM > monitoring right after other events start while keeping it independent > of perf. The idea is to have future versions of CAT to also rely on > this hook. CAT did the msr write in switch_to as Peter did not want a new hook to be used. Same could be done here. Thanks, Vikas > > On Fri, Apr 29, 2016 at 11:05 AM, David Carrillo-Cisneros > wrote: >> This hook is used in the following patch in the series to write to >> PQR_ASSOC_MSR, a msr that is utilized both by CQM/CMT and by CAT. Since CAT >> is not dependent on perf, I created this hook to start CQM monitoring right >> after other events start while keeping it independent of perf. The idea is >> to have future versions of CAT to also rely on this hook. >> >> On Fri, Apr 29, 2016 at 1:52 AM Peter Zijlstra wrote: >>> >>> On Thu, Apr 28, 2016 at 09:43:31PM -0700, David Carrillo-Cisneros wrote: >>>> This hook allows architecture specific code to be called at the end of >>>> the task switch and after perf_events' context switch but before the >>>> scheduler lock is released. >>>> >>>> The specific use case in this series is to avoid multiple writes to a >>>> slow >>>> MSR until all functions which modify such register in task switch have >>>> finished. >>> >>> Yeah, no. This really need way more justification. Why can't you use the >>> regular perf sched-in stuff for CQM? >