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:	Sun, 17 Jan 2010 15:12:35 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, paulus@...ba.org,
	davem@...emloft.net, perfmon2-devel@...ts.sf.net
Subject: Re: [PATCH] perf_events: improve x86 event scheduling

On Wed, Jan 13, 2010 at 06:22:54PM +0100, Stephane Eranian wrote:
> Ok,
> 
> Something like that should problably do it:
> 
> static void event_sched_out(struct perf_event *event, int cpu)
> {
>         event->state = PERF_EVENT_STATE_INACTIVE;
>         event->oncpu = -1;
> }



You need to also call pmu->disable() if it is a software event,
because a breakpoint needs to be unregistered in hardware level
too.

And disable it in x86 level if it is an x86 event?


 
> hw_perf_group_sched_in()
> {
>        ....
>        n = 1;
>         list_for_each_entry(sub, &leader->sibling_list, group_entry) {
>                 if (sub->state > PERF_EVENT_STATE_OFF) {
>                         ret = event_sched_in(sub, cpu);
>                         if (ret)
>                                 goto undo;



Yeah we indeed really need to check that.

Thanks.

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