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:	Wed, 6 Jul 2011 18:53:57 +0200
From:	Robert Richter <robert.richter@....com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] [PATCH] perf: Attaching an event to a specific PMU

On 05.07.11 05:12:52, Ingo Molnar wrote:
> 
> * Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> 
> > > Overall, my approach improves the perf design. It adds a better 
> > > and more intuitve access to perf from user space with clear and 
> > > common methods and interfaces. Please let me know the concerns 
> > > you have.
> > 
> > Its redundant, this interface ship has sailed, its not going to 
> > happen.
> 
> Even if we had the choice, i don't see how a /dev based enumeration 
> of PMUs is in any way better than a topologically attached set of 
> PMUs in /sys.
> 
> This kind of structure is nice in principle:
> 
>  # ls -l /dev/pmu/
>  total 0
>  crw-rw---- 1 root root 254, 5 Jul  8  2011 breakpoint
>  crw-rw---- 1 root root 254, 4 Jul  8  2011 cpu
>  crw-rw---- 1 root root 254, 6 Jul  8  2011 proto
>  crw-rw---- 1 root root 254, 1 Jul  8  2011 software
>  crw-rw---- 1 root root 254, 2 Jul  8  2011 tracepoint
> 
> But it should be done in /sys/.

I have to learn yet why /dev is bad and /sys is good...

The system topology is always in /sys, also for device nodes. But we
can't get a device file descriptor from /sys. I doubt /sys is capable
to handle a device use count (need to be checked). We actually must
grab the pmu while attaching events to it. And, user space
implementation is must easier with /dev (see code in my previous
mail).

My patch also includes code that creates a device class. It is also
visible in /sys/class/pmu/*.

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center

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