From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Alexey Budankov <alexey.budankov@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>, Kan Liang <kan.liang@intel.com>,
Dmitri Prokhorov <Dmitry.Prohorov@intel.com>,
Valery Cherepennikov <valery.cherepennikov@intel.com>,
Mark Rutland <mark.rutland@arm.com>,
David Carrillo-Cisneros <davidcc@google.com>,
Stephane Eranian <eranian@google.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 1/4]: perf/core: use rb trees for pinned/flexible groups
Date: Tue, 18 Jul 2017 15:29:10 +0300 [thread overview]
Message-ID: <874luavsh5.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <fb3cd0a0-ff6e-daba-956b-316379e54735@linux.intel.com>
Alexey Budankov <alexey.budankov@linux.intel.com> writes:
> +/*
> + * Helper function to test if event groups are empty;
> + */
> +static int
> +perf_event_groups_empty(struct perf_event_groups *groups)
> +{
> + return list_empty(&groups->list);
> +}
This doesn't seem useful, it's only used once. Also, it's not clear how
access to groups->list is serialized here, but it is in the caller.
I'm assuming you will use this helper after the linked lists are done
away with, but I'll have to go fishing for that patch to make sure.
> +static void
> +perf_event_groups_insert(struct perf_event_groups *groups,
> + struct perf_event *event)
> +{
> + struct rb_node **node;
> + struct rb_node *parent;
> + struct perf_event *node_event;
> +
> + WARN_ON_ONCE(!groups || !event);
I'm pretty sure neither of these is plausible.
> + WARN_ON_ONCE(!list_empty(&event->group_list_entry));
So ctx::lock is held here, right? That could be a useful assert and/or
comment at least for review purposes. Now I see that it's called from
list_add_event().
Regards,
--
Alex
next prev parent reply other threads:[~2017-07-18 12:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 13:03 Alexey Budankov
2017-07-18 12:02 ` Alexander Shishkin
2017-07-18 13:38 ` Alexey Budankov
2017-07-18 12:29 ` Alexander Shishkin [this message]
2017-07-18 13:39 ` Alexey Budankov
2017-07-19 6:36 ` Alexander Shishkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874luavsh5.fsf@ashishki-desk.ger.corp.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=Dmitry.Prohorov@intel.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexey.budankov@linux.intel.com \
--cc=davidcc@google.com \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=valery.cherepennikov@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®