Re: 64-bit jiffies, a better solution

From: george anzinger (george@mvista.com)
Date: Sat May 11 2002 - 01:58:32 EST


Jim Houston wrote:
>
> Hi!
>
> First what problem are you trying to solve?
> Why not have both variables and if they happen
> to endup in the same cache line you probably
> need years worth of jiffies to notice how
> long one more add takes. E.g.
>
> jiffies_64++;
> jiffies++;
>
> To round out the list of options, how about a few lines of
> inline asm? Maybe something like:
>
> extern unsigned long long jiffie_64;
> extern unsigned int jiffie;
> __asm__ (" \
> .data
> .align 8
> .global jiffie
> .global jiffie_64
> .type jiffie,@object
> .size jiffie,4
> .type jiffie_64,@object
> .size jiffie_64,8
> jiffie_64:
> jiffie:
> .long 0, 0
> ");
>
> Adding the obvious ifdef of course. Aside for broken
> binutils this might be portable code :-)

Until you move to a big endian 32-bit machine. I would much rather hear
IS portable.

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
-
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/



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:15 EST