public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "John Hawkes" <hawkes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] - sched_clock() broken for ia64 SN platform
Date: Thu, 20 Nov 2003 20:58:20 +0000	[thread overview]
Message-ID: <marc-linux-ia64-106936209405237@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106928980122896@msgid-missing>

From: "David Mosberger" <davidm@napali.hpl.hp.com>
>   Jack Steiner> However, reading the ITC is faster & preferred if intercpu
>   Jack Steiner> drift is not an issue.
>
> Yes.  Plus we could solve the problem once and for all, not once for
> each drifty platform.
>
> As I remember it, sched_clock() was originally invented to measure
> fine-grained "how long have I run" times.  This can be done with ITC
> without synchronization, since the start and stop "times" will be
> measured on the same CPU.  Howver, as John points out, at the moment
> sched_clock() is also used for migration-decisions.  My guess is that
> this part is just due to someone trying to be overly clever.  At least
> on drifty platforms, you can just as easily make this decision based
> on jiffies.  All it would do is add one word to the task_struct and
> reading both sched_clock() and jiffies when updating the timestamp(s).

I doubt this double-count would ever be accepted by the wider Linux Community,
as it bloats mainline arch-independent code, just to fix a problem with a
handful of drifty platforms.

The i386 code is uglier than my patch, as it makes NUMA platforms use the
gross-granularity "jiffies" as the time base.  So much for any of the benefits
in the scheduler to a high-precision task->timestamp.  At least with my ia64
patch, it allows for a platform-specific sched_clock() that returns a
high-precision value and doesn't appreciably add bloat.

John Hawkes



  parent reply	other threads:[~2003-11-20 20:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-20  0:56 [PATCH] - sched_clock() broken for ia64 SN platform John Hawkes
2003-11-20  1:24 ` David Mosberger
2003-11-20  4:09 ` John Hawkes
2003-11-20  6:01 ` David Mosberger
2003-11-20 15:23 ` Jack Steiner
2003-11-20 17:25 ` Grant Grundler
2003-11-20 17:25 ` Rich Altmaier
2003-11-20 18:32 ` David Mosberger
2003-11-20 19:20 ` Robin Holt
2003-11-20 19:23 ` Robin Holt
2003-11-20 20:58 ` John Hawkes [this message]
2003-11-20 21:27 ` David Mosberger
2003-11-20 21:58 ` john stultz
2003-11-20 22:14 ` John Hawkes

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=marc-linux-ia64-106936209405237@msgid-missing \
    --to=hawkes@sgi.com \
    --cc=linux-ia64@vger.kernel.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