linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: rohitseth@google.com
Cc: discuss@x86-64.org, Chuck Ebbert <76306.1226@compuserve.com>,
	Linus Torvalds <torvalds@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [discuss] Re: [RFC, patch] i386: vgetcpu(), take 2
Date: Sat, 24 Jun 2006 10:42:49 +0200	[thread overview]
Message-ID: <200606241042.50139.ak@suse.de> (raw)
In-Reply-To: <1151114785.23432.38.camel@galaxy.corp.google.com>


> It just does not sound like a right interface.  Why should an app be
> giving the last time value that it asked for the same information.  

First this information comes with a good-before date stamp
so it's natural. Otherwise the application will never pick
up when the scheduler decides to schedule it somewhere else,
which would be bad.

And that came from conversation with application developers.

A: We want something to get the current node
me: how fast does it need to be? 
B: we will cache it anyways.

Problem is that normally the application can't do a good job
at doing the cache because it doesn't have a fast way to 
do time stamping (gettimeofday would be too slow and it's
the fastest timer available short of having a second thread
that sleeps and updates a counter) 

But the vsyscall incidentially knows this because of it
sharing data with  vgettimeofday(), so it can
do the job for the application

> User 
> wants cpu, package and node numbers and those are the three parameters
> that should be there.  Besides if we are using lsl then the latency part
> of cpuid is already gone so no need to optimize this any more.
>
> Though this will be good interface to export jiffies ;-)

No - jiffies don't have a defined unit and might even go away
on a fully tickless kernel.

If we just exported jiffies you would get lots of HZ dependent
programs.

-Andi

  reply	other threads:[~2006-06-24  8:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21  7:27 [RFC, patch] i386: vgetcpu(), take 2 Chuck Ebbert
2006-06-21  8:15 ` Ingo Molnar
2006-06-21 17:38   ` Artur Skawina
2006-06-28  5:44   ` Paul Jackson
2006-06-28  8:53     ` Andi Kleen
2006-06-28  9:00       ` Ingo Molnar
2006-06-29  8:47         ` Paul Jackson
2006-06-21  9:26 ` Andi Kleen
2006-06-21  9:35   ` Ingo Molnar
2006-06-21 21:54   ` Rohit Seth
2006-06-21 22:21     ` Andi Kleen
2006-06-21 22:59       ` Rohit Seth
2006-06-21 23:05         ` Andi Kleen
2006-06-21 23:18           ` Rohit Seth
2006-06-21 23:29             ` Andi Kleen
2006-06-22  0:55               ` Rohit Seth
2006-06-22  8:08                 ` Andi Kleen
2006-06-22 21:06                   ` Rohit Seth
2006-06-22 22:14                     ` Andi Kleen
2006-06-22 23:10                       ` Rohit Seth
2006-06-23 12:42                         ` [discuss] " Andi Kleen
2006-06-24  2:06                           ` Rohit Seth
2006-06-24  8:42                             ` Andi Kleen [this message]
2006-06-27  1:13                               ` Rohit Seth

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=200606241042.50139.ak@suse.de \
    --to=ak@suse.de \
    --cc=76306.1226@compuserve.com \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rohitseth@google.com \
    --cc=torvalds@osdl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).