lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Jul 2017 16:39:36 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Andi Kleen <ak@...ux.intel.com>, Kan Liang <kan.liang@...el.com>,
        Dmitri Prokhorov <Dmitry.Prohorov@...el.com>,
        Valery Cherepennikov <valery.cherepennikov@...el.com>,
        Mark Rutland <mark.rutland@....com>,
        David Carrillo-Cisneros <davidcc@...gle.com>,
        Stephane Eranian <eranian@...gle.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 1/4]: perf/core: use rb trees for pinned/flexible
 groups

Hi,

On 18.07.2017 15:29, Alexander Shishkin wrote:
> Alexey Budankov <alexey.budankov@...ux.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.

Acepted. That API is removed in the final patch where list is replaced by rbtree.

> 
> 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.

Used that for debugging. Does it affect performance somehow?

> 
>> +	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().

Agree.

> 
> Regards,
> --
> Alex
> 

Thanks,
Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ