All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <asharma@fb.com>
To: john stultz <johnstul@us.ibm.com>
Cc: <linux-kernel@vger.kernel.org>, Kumar Sundararajan <kumar@fb.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Andy Lutomirski <luto@MIT.EDU>
Subject: Re: [PATCH 2/2] Add a thread cpu time implementation to vDSO
Date: Mon, 12 Dec 2011 15:20:17 -0800	[thread overview]
Message-ID: <4EE68C31.1030207@fb.com> (raw)
In-Reply-To: <1323731361.4078.102.camel@work-vm>

On 12/12/11 3:09 PM, john stultz wrote:
> On Mon, 2011-12-12 at 11:36 -0800, Arun Sharma wrote:
>> From: Kumar Sundararajan<kumar@fb.com>
>>
>> This primarily speeds up clock_gettime(CLOCK_THREAD_CPUTIME_ID, ..)
>> via a new vsyscall. We also add a direct vsyscall that returns
>> time in ns (RFC: the direct vsyscall doesn't have a corresponding
>> regular syscall, although clock_gettime() is pretty close).
>
> I'm still not super psyched about providing a vdso-only API.
>
> If a nanosecond interface like thread_cpu_time() is actually a big win
> over clock_gettime(CLOCK_THREAD_CPUTIME,...) it seems it should have its
> own syscall as well, no?

The win is relatively small when we're dealing with syscalls. But with 
vsyscalls, it starts showing up in micro benchmarks.

Happy to post patches for regular syscalls (assuming I can get them 
allocated :).

>
> Possibly something like clock_gettime_ns(), which would return the same
> values as clock_gettime() but in nanoseconds rather then a timespec?
>

If we're doing non-POSIXy things there, how about allocating one syscall 
per clock instead of multiplexing them through a single syscall?

This would be a nice to have (clock_gettime_ns() should get us most of 
the perf benefit).

-Arun

  reply	other threads:[~2011-12-12 23:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 19:36 [PATCH 0/2] Add a thread cpu time implementation to vDSO Arun Sharma
2011-12-12 19:36 ` [PATCH 1/2] Extend VVAR support to multiple pages Arun Sharma
2011-12-12 19:36 ` [PATCH 2/2] Add a thread cpu time implementation to vDSO Arun Sharma
2011-12-12 20:13   ` Eric Dumazet
2011-12-12 21:19     ` Arun Sharma
2011-12-12 21:27       ` Eric Dumazet
2011-12-12 21:33         ` Andrew Lutomirski
2011-12-12 22:14         ` Arun Sharma
2011-12-13  8:52           ` Peter Zijlstra
2011-12-13 18:15             ` Arun Sharma
2011-12-13 18:53               ` Peter Zijlstra
2011-12-12 20:15   ` Andrew Lutomirski
2011-12-12 22:49     ` Arun Sharma
2011-12-12 23:01       ` Andrew Lutomirski
2011-12-13  0:40         ` Arun Sharma
2011-12-12 23:09   ` john stultz
2011-12-12 23:20     ` Arun Sharma [this message]
2011-12-12 23:32       ` john stultz
2011-12-12 23:41         ` Andrew Lutomirski
2011-12-12 23:52           ` john stultz
2011-12-13  0:26         ` Arun Sharma
  -- strict thread matches above, loose matches on Subject: below --
2011-12-19 19:51 [PATCH 0/2] Add a thread cpu time implementation to vDSO (v2) Arun Sharma
2011-12-19 19:51 ` [PATCH 2/2] Add a thread cpu time implementation to vDSO Arun Sharma
2011-12-19 19:58   ` Arun Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EE68C31.1030207@fb.com \
    --to=asharma@fb.com \
    --cc=johnstul@us.ibm.com \
    --cc=kumar@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@MIT.EDU \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.