lkml.org 
[lkml]   [2013]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples
On 04/08/2013 10:58 AM, Pawel Moll wrote:
> Now, before I spend time doing all this, a question to John, Peter,
> Stephane and the rest of the public - would a solution providing such
> userspace interface:
>
> fd = sys_perf_open()
> timestamp = clock_gettime((FD_TO_CLOCKID(fd), &ts)
>
> be acceptable to all?

So thinking this through further, I'm worried we may _not_ be able to
eventually enable this to be a vdso as I had earlier hoped. Mostly
because I'm not sure how the fd -> file -> clock lookup could be done in
userland (any ideas?).

So this makes this approach mostly equivalent long term to the ioctl
method, from a performance perspective. And makes the dynamic posix
clockid somewhat less of a middle-ground compromise between the ioctl
and generic constant clockid approach.

So while I'm not opposed to the sort of extention proposed above, I want
to make sure introducing the new approach is worth the effort when
compared with just adding an ioctl.

thanks
-john




\
 
 \ /
  Last update: 2013-04-09 03:01    [W:0.114 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site