From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v3 0/3] perf: User/kernel time correlation and event generation Date: Tue, 04 Nov 2014 09:01:31 +0100 Message-ID: <3430954.VNaFmamXmP@wuerfel> References: <1415060918-19954-1-git-send-email-pawel.moll@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: John Stultz Cc: Andy Lutomirski , Pawel Moll , Richard Cochran , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Paul Mackerras , Arnaldo Carvalho de Melo , Masami Hiramatsu , Christopher Covington , Namhyung Kim , David Ahern , Thomas Gleixner , Tomeu Vizoso , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Linux API , Pawel Moll List-Id: linux-api@vger.kernel.org On Monday 03 November 2014 17:11:53 John Stultz wrote: > I've got some thoughts on what a possible interface that wouldn't be > awful could look like, but I'm still hesitant because I don't really > know if exposing this sort of data is actually a good idea long term. I was also thinking (while working on an unrelated patch) we could use a system call like int clock_getoffset(clockid_t clkid, struct timespec *offs); that returns the current offset between CLOCK_REALTIME and the requested timebase. It is of course racy, but so is every use of CLOCK_REALTIME. We could also use a reference other than CLOCK_REALTIME that might be more stable, but passing two arbitrary clocks as input would make this much more complex to implement. Arnd