From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753982AbbIHJIA (ORCPT ); Tue, 8 Sep 2015 05:08:00 -0400 Received: from ozlabs.org ([103.22.144.67]:35989 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752020AbbIHJH6 (ORCPT ); Tue, 8 Sep 2015 05:07:58 -0400 Message-ID: <1441703275.7601.5.camel@ellerman.id.au> Subject: Re: [[PATCH v6 09/10] powerpc/perf/hv-24x7: Use PMU_TXN_READ interface From: Michael Ellerman To: Sukadev Bhattiprolu Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org Date: Tue, 08 Sep 2015 19:07:55 +1000 In-Reply-To: <1441336073-22750-10-git-send-email-sukadev@linux.vnet.ibm.com> References: <1441336073-22750-1-git-send-email-sukadev@linux.vnet.ibm.com> <1441336073-22750-10-git-send-email-sukadev@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-09-03 at 20:07 -0700, Sukadev Bhattiprolu wrote: > The 24x7 counters in Powerpc allow monitoring a large number of counters > simultaneously. They also allow reading several counters in a single > HCALL so we can get a more consistent snapshot of the system. > > Use the PMU's transaction interface to monitor and read several event > counters at once. The idea is that users can group several 24x7 events > into a single group of events. We use the following logic to submit > the group of events to the PMU and read the values: > > pmu->start_txn() // Initialize before first event > > for each event in group > pmu->read(event); // Queue each event to be read > > pmu->commit_txn() // Read/update all queuedcounters > > The ->commit_txn() also updates the event counts in the respective > perf_event objects. The perf subsystem can then directly get the > event counts from the perf_event and can avoid submitting a new > ->read() request to the PMU. > > Thanks to input from Peter Zijlstra. > > Signed-off-by: Sukadev Bhattiprolu > --- > arch/powerpc/perf/hv-24x7.c | 166 ++++++++++++++++++++++++++++++++++++++++++- This looks fine to me from an arch perspective. I assume the whole series can go via tip-something? Acked-by: Michael Ellerman cheers