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:   Mon, 29 May 2017 13:56:05 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Kan Liang <kan.liang@...el.com>,
        Dmitri Prokhorov <Dmitry.Prohorov@...el.com>,
        Valery Cherepennikov <valery.cherepennikov@...el.com>,
        David Carrillo-Cisneros <davidcc@...gle.com>,
        Stephane Eranian <eranian@...gle.com>,
        Mark Rutland <mark.rutland@....com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2]: perf/core: addressing 4x slowdown during per-process,
 profiling of STREAM benchmark on Intel Xeon Phi

On 29.05.2017 13:43, Peter Zijlstra wrote:
> On Mon, May 29, 2017 at 12:15:14PM +0300, Alexey Budankov wrote:
>> On 29.05.2017 10:46, Peter Zijlstra wrote:
>>> On Sat, May 27, 2017 at 02:19:51PM +0300, Alexey Budankov wrote:
> 
>>>> @@ -742,7 +772,17 @@ struct perf_event_context {
>>>>
>>>>    	struct list_head		active_ctx_list;
>>>>    	struct list_head		pinned_groups;
>>>> +	/*
>>>> +	 * Cpu tree for pinned groups; keeps event's group_node nodes
>>>> +	 * of attached flexible groups;
>>>> +	 */
>>>> +	struct rb_root			pinned_tree;
>>>>    	struct list_head		flexible_groups;
>>>> +	/*
>>>> +	 * Cpu tree for flexible groups; keeps event's group_node nodes
>>>> +	 * of attached flexible groups;
>>>> +	 */
>>>> +	struct rb_root			flexible_tree;
>>>>    	struct list_head		event_list;
>>>>    	int				nr_events;
>>>>    	int				nr_active;
>>>> @@ -758,6 +798,7 @@ struct perf_event_context {
>>>>    	 */
>>>>    	u64				time;
>>>>    	u64				timestamp;
>>>> +	struct perf_event_tstamp	tstamp_data;
>>>>
>>>>    	/*
>>>>    	 * These fields let us detect when two contexts have both
>>>
>>>
>>> So why do we now have a list _and_ a tree for the same entries?
> 
>> We need groups list to iterate through all groups configured for collection
>> and we need the tree to quickly iterate through the groups allocated for a
>> particular CPU only.
> 
> *confused*, what?
> 
> Why can't the tree do both?
> 

Well, indeed, the tree provides such capability too. However switching 
to the full tree iteration in cases where we now go through _groups 
lists will enlarge the patch, what is probably is not a big deal. Do you 
think it is worth implementing the switch?

Thanks,
Alexey

Powered by blists - more mailing lists