kern.timecounter.smp_tsc_adjust

看板FB_hackers作者時間11年前 (2014/06/04 05:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
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"
文章代碼(AID): #1JZZUEBx (FB_hackers)
文章代碼(AID): #1JZZUEBx (FB_hackers)