From: Ingo Molnar <mingo@elte.hu>
To: Guillaume Chazarain <guichaz@yahoo.fr>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Stefano Brivio <stefano.brivio@polimi.it>,
Robert Love <rml@tech9.net>,
linux-kernel@vger.kernel.org, Dave Jones <davej@redhat.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>, Michael Buesch <mb@bu3sch.de>,
"Andrew Morton"@pimp.vs19.net
Subject: Re: [PATCH] scheduler: fix x86 regression in native_sched_clock
Date: Fri, 7 Dec 2007 09:51:21 +0100 [thread overview]
Message-ID: <20071207085121.GA12625@elte.hu> (raw)
In-Reply-To: <20071207090252.1caf1509@inria.fr>
* Guillaume Chazarain <guichaz@yahoo.fr> wrote:
> > Something like http://lkml.org/lkml/2007/3/16/291 that would need
> > some refresh?
>
> And here is a refreshed one just for testing with 2.6-git. The 64 bit
> part is a shamelessly untested copy/paste as I cannot test it.
yeah, we can do something like this in 2.6.25 - this will improve the
quality of sched_clock(). The other patch i sent should solve the
problem for 2.6.24 - printk should not be using raw sched_clock() calls.
(as the name says it's for the scheduler's internal use.) I've also
queued up the patch below - it removes the now unnecessary printk clock
code.
Ingo
--------------------->
Subject: sched: remove printk_clock()
From: Ingo Molnar <mingo@elte.hu>
printk_clock() is obsolete - it has been replaced with cpu_clock().
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/arm/kernel/time.c | 11 -----------
arch/ia64/kernel/time.c | 27 ---------------------------
kernel/printk.c | 5 -----
3 files changed, 43 deletions(-)
Index: linux/arch/arm/kernel/time.c
===================================================================
--- linux.orig/arch/arm/kernel/time.c
+++ linux/arch/arm/kernel/time.c
@@ -79,17 +79,6 @@ static unsigned long dummy_gettimeoffset
}
#endif
-/*
- * An implementation of printk_clock() independent from
- * sched_clock(). This avoids non-bootable kernels when
- * printk_clock is enabled.
- */
-unsigned long long printk_clock(void)
-{
- return (unsigned long long)(jiffies - INITIAL_JIFFIES) *
- (1000000000 / HZ);
-}
-
static unsigned long next_rtc_update;
/*
Index: linux/arch/ia64/kernel/time.c
===================================================================
--- linux.orig/arch/ia64/kernel/time.c
+++ linux/arch/ia64/kernel/time.c
@@ -344,33 +344,6 @@ udelay (unsigned long usecs)
}
EXPORT_SYMBOL(udelay);
-static unsigned long long ia64_itc_printk_clock(void)
-{
- if (ia64_get_kr(IA64_KR_PER_CPU_DATA))
- return sched_clock();
- return 0;
-}
-
-static unsigned long long ia64_default_printk_clock(void)
-{
- return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) *
- (1000000000/HZ);
-}
-
-unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock;
-
-unsigned long long printk_clock(void)
-{
- return ia64_printk_clock();
-}
-
-void __init
-ia64_setup_printk_clock(void)
-{
- if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT))
- ia64_printk_clock = ia64_itc_printk_clock;
-}
-
/* IA64 doesn't cache the timezone */
void update_vsyscall_tz(void)
{
Index: linux/kernel/printk.c
===================================================================
--- linux.orig/kernel/printk.c
+++ linux/kernel/printk.c
@@ -573,11 +573,6 @@ static int __init printk_time_setup(char
__setup("time", printk_time_setup);
-__attribute__((weak)) unsigned long long printk_clock(void)
-{
- return sched_clock();
-}
-
/* Check if we have any console registered that can be called early in boot. */
static int have_callable_console(void)
{
next prev parent reply other threads:[~2007-12-07 8:52 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 1:19 [PATCH] scheduler: fix x86 regression in native_sched_clock Stefano Brivio
2007-12-07 5:29 ` Nick Piggin
2007-12-07 5:51 ` Thomas Gleixner
2007-12-07 7:18 ` Guillaume Chazarain
2007-12-07 8:02 ` Guillaume Chazarain
2007-12-07 8:51 ` Ingo Molnar [this message]
2007-12-07 9:29 ` Guillaume Chazarain
2007-12-07 9:59 ` Ingo Molnar
2007-12-07 13:55 ` [patch] x86: scale cyc_2_nsec according to CPU frequency Ingo Molnar
2007-12-07 14:27 ` Guillaume Chazarain
2007-12-07 14:52 ` Ingo Molnar
2007-12-08 15:57 ` Arjan van de Ven
2007-12-08 19:16 ` Ingo Molnar
2007-12-08 20:18 ` Arjan van de Ven
2007-12-07 10:37 ` [PATCH] scheduler: fix x86 regression in native_sched_clock Andi Kleen
2007-12-07 8:45 ` Ingo Molnar
2007-12-07 10:32 ` Andrew Morton
2007-12-07 10:40 ` Ingo Molnar
2007-12-07 11:07 ` Ingo Molnar
2007-12-07 11:09 ` Andrew Morton
2007-12-07 11:12 ` Ingo Molnar
2007-12-07 11:13 ` Nick Piggin
2007-12-07 11:17 ` Ingo Molnar
2007-12-07 16:48 ` Nick Piggin
2007-12-08 0:50 ` Nick Piggin
2007-12-08 0:57 ` Nick Piggin
2007-12-08 8:52 ` Ingo Molnar
2007-12-08 23:37 ` Guillaume Chazarain
2007-12-12 4:42 ` Nick Piggin
2007-12-12 10:44 ` Ingo Molnar
2007-12-07 11:18 ` Guillaume Chazarain
2007-12-07 11:57 ` Guillaume Chazarain
2007-12-07 11:23 ` stefano.brivio
2007-12-07 12:11 ` Ingo Molnar
2007-12-07 12:25 ` Ingo Molnar
2007-12-07 12:35 ` Ingo Molnar
2007-12-07 12:40 ` Ingo Molnar
2007-12-07 14:54 ` Ingo Molnar
2007-12-07 16:46 ` Guillaume Chazarain
2007-12-07 17:57 ` Ingo Molnar
2007-12-08 15:06 ` Mark Lord
2007-12-08 15:13 ` Ingo Molnar
2007-12-08 15:27 ` Michael Buesch
2007-12-08 15:33 ` Ingo Molnar
2007-12-08 15:36 ` Michael Buesch
2007-12-08 15:41 ` Ingo Molnar
2007-12-07 11:24 ` Ingo Molnar
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=20071207085121.GA12625@elte.hu \
--to=mingo@elte.hu \
--cc="Andrew Morton"@pimp.vs19.net \
--cc=davej@redhat.com \
--cc=guichaz@yahoo.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@bu3sch.de \
--cc=rjw@sisk.pl \
--cc=rml@tech9.net \
--cc=stefano.brivio@polimi.it \
--cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox