From: Thomas Gleixner <tglx@linutronix.de>
To: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH, RFC] use hrtimer in sched_clock
Date: Mon, 14 Jul 2008 11:30:00 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.1.10.0807141123450.3283@apollo.tec.linutronix.de> (raw)
In-Reply-To: <1215809727-28598-1-git-send-email-Uwe.Kleine-Koenig@digi.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 977 bytes --]
On Fri, 11 Jul 2008, Uwe Kleine-König wrote:
> This should make it unnecessary to overwrite sched_clock for a higher
> precision.
> With this patch I get sub-jiffie timing with CONFIG_PRINTK_TIME=y.
>
> Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@elte.hu>
> ---
> Hello,
>
> I tested the patch on arch-arm/mach-ns9xxx and it seem seams to work.
> But I admit I didn't test it deeply and I didn't measure if there is any
> overhead.
There is lots of overhead and your approach is simply wrong.
> unsigned long long __attribute__((weak)) sched_clock(void)
The correct way to solve it is to override sched_clock() with a high
resolution implementation for your hardware platform. sched_clock is a
weak function to provide a default implementation based on jiffies.
If you do a grep -r sched_clock arch/arm you'll find a couple of
examples how to override sched_clock().
Thanks,
tglx
next prev parent reply other threads:[~2008-07-14 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 20:55 Uwe Kleine-König
2008-07-14 9:30 ` Thomas Gleixner [this message]
2008-07-14 9:48 ` Uwe Kleine-König
2008-07-14 10:03 ` Thomas Gleixner
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=alpine.LFD.1.10.0807141123450.3283@apollo.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=Uwe.Kleine-Koenig@digi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
Powered by JetHome