All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Jesper Juhl <jesper.juhl@gmail.com>, Dominik Brodowski <linux@brodo.de>
Subject: [Fwd: sched_clock() has poor resolution]
Date: Thu, 22 Sep 2005 09:28:49 +0200	[thread overview]
Message-ID: <43325D31.3090604@drzeus.cx> (raw)

cc:ing some timer hackers.

-------- Original Message --------
Subject: sched_clock() has poor resolution
Date: Tue, 20 Sep 2005 12:02:34 +0200
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: LKML <linux-kernel@vger.kernel.org>

I've been trying to hunt down a HZ bug and as part of that I thought
having printk timestamps would be nice. But too much dismay I noticed
that I couldn't get very good resolution out of these.

The problem turned out to be that sched_clock() uses jiffies as a time
source. It will only use the TSC if that's the primary time source of
the system. But since I have a PM timer that is given priority.

So I see two solutions here:

 * Let sched_clock() follow the time source. Don't have it coupled to
the TSC.

 * Init the TSC even though it isn't used for anything but sched_clock().

The first solution might have problems if one of the "better" timers are
slow as hell to read and the second if there is some assumed dependency
between sched_clock() and the primary timer. I'm blisfully ignorant of
this area so input is welcome.

Rgds
Pierre
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

             reply	other threads:[~2005-09-22  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22  7:28 Pierre Ossman [this message]
2005-09-22 20:59 ` [Fwd: sched_clock() has poor resolution] Dominik Brodowski

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=43325D31.3090604@drzeus.cx \
    --to=drzeus-list@drzeus.cx \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@brodo.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.