lkml.org 
[lkml]   [2004]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix get_jiffies_64 to work on voyager


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [from the cache]
©2003-2011 Jasper Spaans