Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751271AbdHCNEJ (ORCPT ); Thu, 3 Aug 2017 09:04:09 -0400 Received: from merlin.infradead.org ([205.233.59.134]:37230 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751124AbdHCNEI (ORCPT ); Thu, 3 Aug 2017 09:04:08 -0400 Date: Thu, 3 Aug 2017 15:04:00 +0200 From: Peter Zijlstra To: Alexey Budankov Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Andi Kleen , Kan Liang , Dmitri Prokhorov , Valery Cherepennikov , Mark Rutland , Stephane Eranian , David Carrillo-Cisneros , linux-kernel Subject: Re: [PATCH v6 2/3]: perf/core: use context tstamp_data for skipped events on mux interrupt Message-ID: <20170803130400.rw6ywjmj6qy7jamk@hirez.programming.kicks-ass.net> References: <96c7776f-1f17-a39e-23e9-658596216d6b@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1886 Lines: 41 On Wed, Aug 02, 2017 at 11:15:39AM +0300, Alexey Budankov wrote: > Event groups allocated for CPU's different from the one that handles multiplexing > hrtimer interrupt may be skipped by interrupt handler however the events > tstamp_enabled, tstamp_running and tstamp_stopped fields still need to be updated > to have correct timings. > > To implement that tstamp_data object is introduced at the event context > and the skipped events' tstamps pointers are switched between self and context > tstamp_data objects. > > The context object timings are updated by update_context_time() on every > multiplexing hrtimer interrupt so all events referencing the context object get its > timings properly updated all at once. > > Event groups tstamps are switched to the context object and back to self object > if they don't pass thru event_filter_match() on thread context switch in and out. FWIW, Changelogs should be <=72 characters (like normal emails). All sane editors can do this for you. Also, you have weird trailing whitespace in your messages. The above then ends up like: Event groups allocated for CPU's different from the one that handles multiplexing hrtimer interrupt may be skipped by interrupt handler however the events tstamp_enabled, tstamp_running and tstamp_stopped fields still need to be updated to have correct timings. To implement that tstamp_data object is introduced at the event context and the skipped events' tstamps pointers are switched between self and context tstamp_data objects. The context object timings are updated by update_context_time() on every multiplexing hrtimer interrupt so all events referencing the context object get its timings properly updated all at once. Event groups tstamps are switched to the context object and back to self object if they don't pass thru event_filter_match() on thread context switch in and out.