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]
Message-ID: <CABPqkBSV7MwALrv1Sah6L9C2FP=AGXC2+yeN=jsJk=HrO1bNzA@mail.gmail.com>
Date:	Thu, 21 Jun 2012 13:48:09 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	"Yan, Zheng" <zheng.z.yan@...el.com>, mingo@...e.hu,
	jolsa@...hat.com, andi@...stfloor.org,
	linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH V6 0/13] perf: Intel uncore pmu counting support

On Thu, Jun 21, 2012 at 1:40 PM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Thu, 2012-06-21 at 11:13 +0200, Stephane Eranian wrote:
>
>> >>> How about treat the 'cpu' parameter for uncore event as socket id instead
>> >>> of cpu id?
>> >>>
>> >> But that does not address the use case of Peter, i.e., no cpu parameter passed.
>> >> Looks like sysfs might be the only way to do this in a portable manner.
>> >>
>> > It does. For example, on a dual socket system, perf can only register uncore
>> > counter with 'cpu' parameter is equal to 0 or 1. This method is hacky, but it
>> > requires minimal change for the kernel and perf tool.
>> >
>> I was saying, I don't want to have to pass -C x with -a and yet have perf stat
>> only instantiate the event once per socket. I think that's what PeterZ was
>> asking about.
>
> What Zheng is saying is that -a will iterate [0..nr_cpus), but since
> we're interpreting the sys_perf_event_open(.cpu) argument as node, we'll
> fail the syscall with -EINVAL or so for .cpu >= nr_node_ids.
>
Ok, but how do you distinguish EINVAL is this case from an error with a non
uncore event? Unless you return a unique error code, I don't see how you'd solve
that. In general, I don't like it when perf switches events or CPUs under the
cover.

When happens with -a -A?


> This way, we'll only create one counter per node.
>
> I would work, but its not pretty since we still don't know what we're
> iterating.

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