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: <20150102171738.GB2381637@devbig257.prn2.facebook.com>
Date:	Fri, 2 Jan 2015 09:17:38 -0800
From:	Shaohua Li <shli@...com>
To:	David Ahern <dsahern@...il.com>
CC:	Peter Zijlstra <peterz@...radead.org>,
	Andy Lutomirski <luto@...capital.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	X86 ML <x86@...nel.org>, <Kernel-team@...com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH v2 3/3] X86: Add a thread cpu time implementation to vDSO

On Fri, Jan 02, 2015 at 10:09:10AM -0700, David Ahern wrote:
> On 1/2/15 10:02 AM, Shaohua Li wrote:
> >On Fri, Jan 02, 2015 at 08:31:33AM -0700, David Ahern wrote:
> >>On 1/1/15 7:59 PM, Shaohua Li wrote:
> >>>I'm wondering how we could use the perf to implament a clock_gettime.
> >>>reading the perf fd or using ioctl is slow so reading the mmap
> >>>ringbuffer is the only option. But as far as I know the ringbuffer has
> >>>data only when an event is generated. Between two events, there is
> >>>nothing we can read from the ringbuffer. Then how can application get
> >>>time info in the interval?
> >>
> >>Are you wanting to read perf_clock from userspace?
> >
> >Yep, in some sort of form. Basically I want to read the time a task
> >runs. Peter suggests we can read the activation time of a perf event.
> >But I don't want to use any system call, as it's slow and likes
> >clock_gettime.
> 
> Since we cannot get the capability committed upstream a number of
> folks are using this method:
> 
>     https://github.com/dsahern/linux/blob/perf-full-monty/README.ahern
> 
> ie., a KLM exports perf_clock and apps can use:
> 
> #define CLOCK_PERF 14
> if (clock_gettime(CLOCK_PERF, &ts) != 0) {
> }
> 
> No vdso acceleration, but works with an unmodified kernel.

no, that's not what I want. as I said, we don't want any syscall (unless
it's vdso based). 

Thanks,
Shaohua
--
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