[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0807141123450.3283@apollo.tec.linutronix.de>
Date: Mon, 14 Jul 2008 11:30:00 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Uwe Kleine-König <Uwe.Kleine-Koenig@...i.com>
cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH, RFC] use hrtimer in sched_clock
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@...i.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...e.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
Powered by blists - more mailing lists