usched_bsd4 - topology sched: go for safe defaults
authorAlex Hornung <alex@alexhornung.com>
Thu, 30 Aug 2012 08:17:12 +0000 (08:17 +0000)
committerAlex Hornung <alex@alexhornung.com>
Thu, 30 Aug 2012 08:17:12 +0000 (08:17 +0000)
 * 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

sys/kern/usched_bsd4.c

index 7a570cb..9366d3f 100644 (file)
@@ -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;
                        }