It is possible that GEOM taste provider before SMP is started.

We can't bind to a CPU which is not yet on-line, so add code that wait for
CPUs to go on-line before binding to them.

Reported by:	Alin-Adrian Anton <aanton@spintech.ro>
MFC after:	2 weeks
This commit is contained in:
Pawel Jakub Dawidek 2007-01-28 20:29:12 +00:00
parent 3d14f9377c
commit a1ea1a22e9

View File

@ -324,6 +324,13 @@ g_eli_worker(void *arg)
wr = arg;
sc = wr->w_softc;
#ifdef SMP
/* Before sched_bind() to a CPU, wait for all CPUs to go on-line. */
if (sc->sc_crypto == G_ELI_CRYPTO_SW && g_eli_threads == 0) {
while (!smp_started)
tsleep(wr, 0, "geli:smp", hz / 4);
}
#endif
mtx_lock_spin(&sched_lock);
sched_prio(curthread, PRIBIO);
if (sc->sc_crypto == G_ELI_CRYPTO_SW && g_eli_threads == 0)