From: Andrew Morton <akpm@osdl.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: johnstultz@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix get_jiffies_64 to work on voyager
Date: Tue, 6 Jan 2004 08:19:47 -0800 [thread overview]
Message-ID: <20040106081947.3d51a1d5.akpm@osdl.org> (raw)
In-Reply-To: <1073405053.2047.28.camel@mulgrave>
James Bottomley <James.Bottomley@SteelEye.com> wrote:
>
> This patch
>
>
> ChangeSet@1.1534.5.2, 2003-12-30 15:40:23-08:00, akpm@osdl.org
> [PATCH] ia32 jiffy wrapping fixes
>
> Causes the voyager boot to hang. The problem is this change:
>
> --- a/arch/i386/kernel/timers/timer_tsc.c Tue Jan 6 09:57:34 2004
> +++ b/arch/i386/kernel/timers/timer_tsc.c Tue Jan 6 09:57:34 2004
> @@ -141,7 +140,7 @@
> #ifndef CONFIG_NUMA
> if (!use_tsc)
> #endif
> - return (unsigned long long)jiffies * (1000000000 / HZ);
> + return (unsigned long long)get_jiffies_64() *
> (1000000000 / HZ);
Hm, OK. I hit the same deadlock when running with the "don't require TSCs
to be synchronised in sched_clock()" patch from -mm. The fix for that is
below. I shall accelerate it.
--- 25/arch/i386/kernel/timers/timer_tsc.c~sched_clock-2.6.0-A1-deadlock-fix 2003-12-30 00:45:09.000000000 -0800
+++ 25-akpm/arch/i386/kernel/timers/timer_tsc.c 2003-12-30 00:45:09.000000000 -0800
@@ -140,7 +140,8 @@ unsigned long long sched_clock(void)
#ifndef CONFIG_NUMA
if (!use_tsc)
#endif
- return (unsigned long long)get_jiffies_64() * (1000000000 / HZ);
+ /* jiffies might overflow but this is not a big deal here */
+ return (unsigned long long)jiffies * (1000000000 / HZ);
/* Read the Time Stamp Counter */
rdtscll(this_offset);
_
next prev parent reply other threads:[~2004-01-06 16:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-06 16:04 James Bottomley
2004-01-06 16:19 ` Andrew Morton [this message]
2004-01-06 16:26 ` James Bottomley
2004-01-06 17:05 ` Andrew Morton
2004-01-06 18:53 ` James Bottomley
2004-01-06 16:29 ` Linus Torvalds
2004-01-06 17:05 ` Andrew Morton
2004-01-06 17:11 ` Tim Schmielau
2004-01-06 17:22 ` Andrew Morton
2004-01-06 17:37 ` Tim Schmielau
2004-01-06 18:02 ` Linus Torvalds
2004-01-06 16:30 ` Tim Schmielau
2004-01-06 16:26 ` Linus Torvalds
2004-01-06 18:29 ` Paulo Marques
2004-01-06 18:46 ` Linus Torvalds
2004-01-06 19:04 ` Paulo Marques
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=20040106081947.3d51a1d5.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=James.Bottomley@SteelEye.com \
--cc=johnstultz@us.ibm.com \
--cc=linux-kernel@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
Powered by JetHome