All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Andrew Morton <akpm@osdl.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	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:29:16 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0401060826570.2653@home.osdl.org> (raw)
In-Reply-To: <20040106081947.3d51a1d5.akpm@osdl.org>



On Tue, 6 Jan 2004, Andrew Morton wrote:
> 
> 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);

Augh. If you cast it to "unsigned long long" anyway, why not just use the 
right value? It's "jiffies_64".

It has other problems, of course, but at least that makes them slightly 
less.

		Linus

  parent reply	other threads:[~2004-01-06 16:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-06 16:04 [PATCH] fix get_jiffies_64 to work on voyager James Bottomley
2004-01-06 16:19 ` Andrew Morton
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 [this message]
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=Pine.LNX.4.58.0401060826570.2653@home.osdl.org \
    --to=torvalds@osdl.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --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 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.