kern.timecounter.smp_tsc_adjust
In x86/x86/tsc.c we have several routines for checking the
TSCs across multiple CPUs in an SMP system, and then optionally
adjusting them.
We tried turning on the adjustment option and the system promptly
crashed. This appears to be the culprit:
static int
test_tsc(void)
{
uint32_t *data, *tsc;
(note the type of "*data")
static void
comp_smp_tsc(void *arg)
{
uint32_t *tsc;
(again, uint32_t), but:
static void
adj_smp_tsc(void *arg)
{
uint64_t *tsc;
The TSC_READ code uses rdtsc32(), so the types are more or less
correct there, but maybe everyone should just use 64 bits
throughout, and rdtsc()?
In any case, at least one, and maybe two, routines need their
types changed (and maybe the TSC_READ macro as well). Is it OK
to just assume the upper 32 bits are in sync?
Chris
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 1 之 4 篇):