From: Alex Hornung Date: Thu, 30 Aug 2012 08:17:12 +0000 (+0000) Subject: usched_bsd4 - topology sched: go for safe defaults X-Git-Tag: v3.2.0~225 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/f3025b16812bc484c7b518058fe2f5324dc310ae usched_bsd4 - topology sched: go for safe defaults * When we don't know how to handle the level of the current CPU, go for safe defaults disabling both cache-coherent and SMT scheduling. * This seems to be the case on single-core machines where the level is the PACKAGE_LEVEL. Reported-by: Max Herrgard, Ferruccio Zamuner, David Shao Dragonfly-bug: http://bugs.dragonflybsd.org/issue2408 Dragonfly-bug: http://bugs.dragonflybsd.org/issue2413 --- diff --git a/sys/kern/usched_bsd4.c b/sys/kern/usched_bsd4.c index 7a570cb..9366d3f 100644 --- a/sys/kern/usched_bsd4.c +++ b/sys/kern/usched_bsd4.c @@ -1913,8 +1913,12 @@ sched_thread_cpu_init(void) "Package Siblings: ", i); break; default: + /* Let's go for safe defaults here */ + smt_not_supported = 1; + cache_coherent_not_supported = 1; if (bootverbose) - kprintf ("\tcpu%d - Unknown cpunode->type. Siblings: ", i); + kprintf ("\tcpu%d - Unknown cpunode->type=%u. Siblings: ", + i, (unsigned int)dd->cpunode->type); break; }