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, 12 Oct 2015 14:43:36 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	David Ahern <dsahern@...il.com>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a
 leader thread

On Fri, Oct 09, 2015 at 03:58:49PM +0900, Namhyung Kim wrote:

SNIP

> 
> 
> > 
> > some comment on how we treat map groups in general (for fork/clone/exit)
> > would be awesome ;-)
> 
> I admit that this code is subtle and confusing..  How about this?
> 
> 
> Managing map groups is subtle in that we basically want to share a map
> groups between threads in a process.  When a new process is created
> (forked), the child clones (current) map groups from the parent.  But
> if a new thread is called it only gets a reference of the leader's mg.
> 
> Complication comes from the exec as we also want to keep the history
> of a thread's execution, so the map groups are now managed by mg_list.
> This mg_list is maintained by leader threads only, and non-leader
> threads have a reference a mg at the time in the mg_list.  It uses a
> timestamp at the event to find out the correct mg in the mg_list.
> 
> One corner case is when exec is called from a non-leader thread.  We
> want to add a new mg to the mg_list in the thread.  But it doesn't
> have a mg_list since it was not a leader.  So it sets up a mg_list and
> insert a cloned mg from the old leader.  Now it can handle exec as
> usual - create a new mg and insert it to the mg_list.

seems ok, thanks

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ