Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4079548ybg; Mon, 21 Oct 2019 03:30:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBlbnTzUzUASl625sHVnDCptGdLyvlt5wyRXPNmn48VP/gAydzG1p2KUgmzkrOaKoAKRxU X-Received: by 2002:a50:8f03:: with SMTP id 3mr24663777edy.195.1571653800706; Mon, 21 Oct 2019 03:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571653800; cv=none; d=google.com; s=arc-20160816; b=SlIdqNkkgKazAAm6m4+3IMqbwGqJTvFTpLZxaIgg/EDyrPBpsV081q0VicnsfFU18g RGNG1WOgDFxnwv/yGhxxRxJyDU9aLMIolKKwdTdbsIWG/3aLVdoTAtod1Z4flf3WuMwp gC99YKezhjV1w70qAzc9E/yRjQUCdOZ+ApeRqODEUDNDzGK9WxirjDMCkZzv4x8TSjxp d+3PyvnvJV0G8OjWi73CrKlLbRpHBoaQtFlCNFqP9rK0vQ65eNlfKKs8YJxotko9aUt5 pVI35jwOtpRdhQbn/tCFLSBwOdikgvgwxU02Hd8OQT60VcuW8k/f7XdJ6fhxsk7QXmoP Nm0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=U8nciGtDPR4VxMqPCT0G6y87PJTC0sr+Cxw7PQD89NI=; b=F2qaM3+9hgovSKSFTPZf/1tpbh4lBPj4ZnAs6D9Yd0OqwfL0WsB2KKDSCQZEQT35rz nEeQc1MAOvUOeBZ9bPpXy9bZPQiQSvxLs8ne/uht/j9LXbV2nUX/eQUjS5oW87kwjAg7 VUdmPfsEEeoqJ+C/tQIY2njTytsOU9OD3w56lK3AvZBXTG1/+cH8VrStP+6axReQR5sr T7zwf5aRzh41yMWzJuiNLjy5rS358AG/gv0kuUK++01MVsZ6zNwNV36kYUBO/j/CXIKs cWKJQsLpXhqBVGnX5Mvi82ZKXbrtLpXmEjeGUXwXHKXfuTQinc6Yvu29/KZfTqOskTMv neMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=sRZ9HnDb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n21si4024269ejx.148.2019.10.21.03.29.37; Mon, 21 Oct 2019 03:30:00 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=sRZ9HnDb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727962AbfJUK1Q (ORCPT + 99 others); Mon, 21 Oct 2019 06:27:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34874 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbfJUK1P (ORCPT ); Mon, 21 Oct 2019 06:27:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=U8nciGtDPR4VxMqPCT0G6y87PJTC0sr+Cxw7PQD89NI=; b=sRZ9HnDb/2i4iXMIzwRA4KF+p kGmGwrhBT6EGup3ekX3UJDATVFG3mE/GAbVSWm4OMDW/NvG6TAv4VRKPx5VjE8oMOPlods8efqEAj Pp4xN8C7mw4jwADlxFDdNi8v/UUHEY2tg3sDmgu3VAh+5m3i3etI6nDS9ir0Dfh88JlO2Rb+MVZBn igBtHqp5bhNm7Pn9rpFq0EArHmpLe0nXwtAtqyza4O0/U5WzM4P7a4Yk0TeDLnWPi5jDUiEFRqES3 KkatcvY7OkCcl/htuI7zlaYfujfPEX/Tj737MSa2aKvFyfEVk0HGh03+xxLkC+EGD92tCiMEV19ld QIR92/pfA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMUu6-0003Dj-5f; Mon, 21 Oct 2019 10:27:10 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 71AD3301124; Mon, 21 Oct 2019 12:26:09 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 897562022BA17; Mon, 21 Oct 2019 12:27:06 +0200 (CEST) Date: Mon, 21 Oct 2019 12:27:06 +0200 From: Peter Zijlstra To: Alexey Budankov 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 Subject: Re: [PATCH v3 1/4] perf/core,x86: introduce sync_task_ctx() method at struct pmu Message-ID: <20191021102706.GE1800@hirez.programming.kicks-ass.net> References: <0b20a07f-d074-d3da-7551-c9a4a94fe8e3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > + */ > + void (*sync_task_ctx) (void *one, void *another); The traditional argment names for context switching functions are prev and next.