From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932115AbcBVWUd (ORCPT ); Mon, 22 Feb 2016 17:20:33 -0500 Received: from www.linutronix.de ([62.245.132.108]:36782 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756109AbcBVWUb (ORCPT ); Mon, 22 Feb 2016 17:20:31 -0500 Message-Id: <20160222221011.364140369@linutronix.de> User-Agent: quilt/0.63-1 Date: Mon, 22 Feb 2016 22:19:14 -0000 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , x86@kernel.org, Borislav Petkov , Stephane Eranian , Harish Chegondi , Kan Liang , Andi Kleen , Jacob Pan Subject: [patch V3 09/28] perf: Allow storage of pmu private data in event References: <20160222220733.632098221@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=perf--Allow-storage-of-pmu-private-data-in-event.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For pmus which are not per cpu, but e.g. per package/socket, we want to be able to store a reference to the underlying per package/socket facility in the event at init time so we can avoid magic storage constructs in the pmu driver. This allows us to get rid of the per cpu dance in the intel uncore and rapl drivers and avoids a lookup of the per package data in the perf hotpath. Signed-off-by: Thomas Gleixner --- include/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -467,6 +467,7 @@ struct perf_event { int group_flags; struct perf_event *group_leader; struct pmu *pmu; + void *pmu_private; enum perf_event_active_state state; unsigned int attach_state;