Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4134755ybg; Mon, 21 Oct 2019 04:26:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLmGTjNK9LLOitHi+3Owtbm4ODG4SuLms7h0RMKy1DtS/hBCW84KdHNIA6MvDcYM/RN0Xp X-Received: by 2002:a05:6402:557:: with SMTP id i23mr24080849edx.71.1571657165802; Mon, 21 Oct 2019 04:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571657165; cv=none; d=google.com; s=arc-20160816; b=Be7RUpANs+hP0mnojMDl9nqGFyxHdlG+QDYesqtNFXgiL/rym3heg5V/iJtx0ViDJ5 26/CqKNu65SU9gnA0Rz4cISO9BNJygygLr1kuVt1YQleeQs9xs6P+E4ZwNDYQ8bB/z1Q wFpDi8bXXBz40aSaNDEaWxxxphPvbdRRgd0GJ3sI4xQX1jCYdDzVo1TWe6/ofRGwEB5T 4L81O9A6QXVEgG6HiwJWl9FVb2cbE8XVT47/prxT78OdEuUhYn7dQ8Ga/Az+EqRROba/ kFKXWXRvO/YBgY8vVl9eIfV1uLW6EPt2lkP0WjmUYNht8Dh8Uv4R9B2PNv3FA2EfMVEJ 2mdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=43kSIN8qQvQybQjuD2+ubb0lYCPztxpvzHZEZq66Jlw=; b=ggHv3t94jI3zSEJ/YclVpZDAYPuRyHpTYv3/QV+Or1rEdSo4pJBv6EzSo/1R5P6hS/ gnnvKfCOL2jMO6I1tCBBPM5MmFnlUOUO1aRIbDFPKBvLEGLvaFoT3olncypq1Yg4ri58 OsRRt+CoFBm7+jNk3id3+Pyiq/4q6qF45fiKeJoP3auWU5TCvTZNdrVJ/vkvXVlOorso lZiNHuHRKsraHSESbWoFLqga2Zb0YzGVZOgY2EvDOrRLjpQ7La1d1MT75/NKmEocMsIv YTrPDWOs5qbDn5nsI538T6k1+oG+VOJRiNZ20LVoPC9hrdhdqYB3YPU3ejVxONtBSoO3 DTeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f47si9973567ede.263.2019.10.21.04.25.42; Mon, 21 Oct 2019 04:26:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728416AbfJULZE (ORCPT + 99 others); Mon, 21 Oct 2019 07:25:04 -0400 Received: from mga01.intel.com ([192.55.52.88]:33477 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728384AbfJULZE (ORCPT ); Mon, 21 Oct 2019 07:25:04 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 04:25:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,323,1566889200"; d="scan'208";a="227286627" Received: from linux.intel.com ([10.54.29.200]) by fmsmga002.fm.intel.com with ESMTP; 21 Oct 2019 04:25:03 -0700 Received: from [10.125.253.9] (abudanko-mobl.ccr.corp.intel.com [10.125.253.9]) by linux.intel.com (Postfix) with ESMTP id 3E0E558029D; Mon, 21 Oct 2019 04:25:00 -0700 (PDT) Subject: Re: [PATCH v3 1/4] perf/core,x86: introduce sync_task_ctx() method at struct pmu To: Peter Zijlstra Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andi Kleen , Kan Liang , Stephane Eranian , Ian Rogers , Song Liu , linux-kernel References: <0b20a07f-d074-d3da-7551-c9a4a94fe8e3@linux.intel.com> <20191021102706.GE1800@hirez.programming.kicks-ass.net> From: Alexey Budankov Organization: Intel Corp. Message-ID: <975abbb4-7b3d-32a6-e21d-a9c161aabc01@linux.intel.com> Date: Mon, 21 Oct 2019 14:24:59 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191021102706.GE1800@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21.10.2019 13:27, Peter Zijlstra wrote: > On Fri, Oct 18, 2019 at 12:42:44PM +0300, Alexey Budankov wrote: >> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h >> index 61448c19a132..60bf17af69f0 100644 >> --- a/include/linux/perf_event.h >> +++ b/include/linux/perf_event.h >> @@ -409,6 +409,13 @@ struct pmu { >> */ >> size_t task_ctx_size; >> >> + /* >> + * PMU specific parts of task perf event context (i.e. ctx->task_ctx_data) >> + * can be synchronized using this function. See Intel LBR callstack support >> + * implementation and Perf core context switch handling callbacks for usage >> + * examples. > > You're forgetting to mark this: Optional Fixed in v4. > >> + */ > >> + void (*sync_task_ctx) (void *one, void *another); > > The traditional argment names for context switching functions are prev > and next. Fixed in v4. Thanks, Alexey