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] [day] [month] [year] [list]
Message-ID: <20160229122320.GL6356@twins.programming.kicks-ass.net>
Date:	Mon, 29 Feb 2016 13:23:20 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	"Liang, Kan" <kan.liang@...el.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"eranian@...gle.com" <eranian@...gle.com>,
	"vincent.weaver@...ne.edu" <vincent.weaver@...ne.edu>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"acme@...hat.com" <acme@...hat.com>,
	"jolsa@...hat.com" <jolsa@...hat.com>,
	"ying.huang@...ux.intel.com" <ying.huang@...ux.intel.com>,
	"alexander.shishkin@...ux.intel.com" 
	<alexander.shishkin@...ux.intel.com>
Subject: Re: [PATCH 1/1] perf/core: find auxiliary events in running pmus list

On Sun, Feb 28, 2016 at 04:31:49PM +0000, Liang, Kan wrote:
> > static void account_pmu_sb_event(struct perf_event *event) {
> > 	if (event->parent)
> > 		return;
> > 
> > 	if (event->attach & ATTACH_TASK)
> > 		return;

^^^^ this

> > 	if (event->attr.mmap || event->attr.mmap_data || event->attr.mmap2)
> > 		attach_sb_event(event, sb_mmap);
> > 
> > 	if (event->attr.comm || event->attr.comm_exec)
> > 		attach_sb_event(event, sb_comm);
> > 
> > 	if (event->attr.task)
> > 		attach_sb_event(event, sb_task);
> > 
> > 	if (event->attr.context_switch)
> > 		attach_sb_event(event, sb_switch);
> > }

> > And then you can replace the whole global part of perf_event_aux (which I
> > would rename to perf_event_sb), with this.
> > 
> > You still have to do something like:
> > 
> > 	for_each_task_context_nr(ctxn) {
> > 		ctx = rcu_dereference(current->perf_event_ctxp[ctxn]);
> > 		if (!ctx)
> > 			continue;
> > 		perf_event_sb_ctx(ctx, output, data);
> > 	}
> >
> 
> I'm not sure why we need something like for_each_task_context_nr(ctxn) in
> perf_event_aux/perf_event_sb.
> Isn't perf_event_sb_mask enough?
> It looks perf_event_sb_mask will go through all possible interested events
> (includes both per cpu and per task events). 

See sites marked "^^^ this"

This stuff explicitly does not handle task events, because of the below:

> > To get at the per task events, because I don't think we want to go update
> > more global state on context switch, nor am I entirely sure its worth it to
> > keep per sb ctx->event_list[]s.

^^^ this

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ