Re: [PATCH] Support for assymmetric SMP

From: Andrea Arcangeli (andrea@suse.de)
Date: Sun Mar 10 2002 - 23:29:54 EST


On Mon, Mar 11, 2002 at 04:34:21AM +0100, Kurt Garloff wrote:
> @@ -53,6 +54,10 @@
> unsigned long *pmd_quick;
> unsigned long *pte_quick;
> unsigned long pgtable_cache_sz;
> + unsigned long cpu_khz;
> + unsigned long fast_gettimeoffset_quotient;
> + unsigned long last_tsc_low;
> + struct timeval xtime;
> } __attribute__((__aligned__(SMP_CACHE_BYTES)));
>
> #define X86_VENDOR_INTEL 0

the only problem is if you happen to get the timer irq always in the
same cpu for a few seconds, then the last_tsc_low will wrap around and
gettimeofday will be wrong. And even if you snapshot the full 64bit of the
tsc you'll run into some trouble if the timer irq will be delivered only
to the same cpu for a long time (for example if you use irq bindings).
you'd lose precision and you'll run into the measuration errors of
fast_gettimeoffset_quotient. The right support for asynchronous TSC
handling is a bit more complicated unfortunately.

Andrea
-
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 : Fri Mar 15 2002 - 22:00:14 EST