From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751452AbbLJNAw (ORCPT ); Thu, 10 Dec 2015 08:00:52 -0500 Received: from mga09.intel.com ([134.134.136.24]:37299 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbbLJNAv (ORCPT ); Thu, 10 Dec 2015 08:00:51 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,408,1444719600"; d="scan'208";a="615823463" From: Alexander Shishkin To: Peter Zijlstra Cc: Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, johannes@sipsolutions.net, Arnaldo Carvalho de Melo Subject: Re: [PATCH 4/7] perf: Free aux pages in unmap path In-Reply-To: <87vb86czxs.fsf@ashishki-desk.ger.corp.intel.com> References: <1449138762-15194-1-git-send-email-alexander.shishkin@linux.intel.com> <1449138762-15194-5-git-send-email-alexander.shishkin@linux.intel.com> <20151204170206.GI17308@twins.programming.kicks-ass.net> <87si3cx7ts.fsf@ashishki-desk.ger.corp.intel.com> <20151209105618.GN6356@twins.programming.kicks-ass.net> <87vb86czxs.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 10 Dec 2015 14:58:36 +0200 Message-ID: <87si3acver.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexander Shishkin writes: > I also hacked perf_event_aux_ctx() to make the above work, like so: > > @@ -5696,15 +5696,18 @@ typedef void (perf_event_aux_output_cb)(struct perf_event *event, void *data); > static void > perf_event_aux_ctx(struct perf_event_context *ctx, > perf_event_aux_output_cb output, > - void *data) > + void *data, bool all) > { > struct perf_event *event; > > list_for_each_entry_rcu(event, &ctx->event_list, event_entry) { > - if (event->state < PERF_EVENT_STATE_INACTIVE) > - continue; > - if (!event_filter_match(event)) > - continue; > + if (!all) { > + if (event->state < PERF_EVENT_STATE_INACTIVE) > + continue; > + if (!event_filter_match(event)) > + continue; > + } > + > output(event, data); > } > } > This last bit is actually not needed at all, not for the task at hand anyway. Regards, -- Alex