Date: Sun, 28 Jan 2007 21:14:58 -0800 From: Nate Lawson <nate@root.org> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/geom/eli g_eli.c Message-ID: <45BD82D2.20301@root.org> In-Reply-To: <20070128202917.5B67916A5A6@hub.freebsd.org> References: <20070128202917.5B67916A5A6@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Pawel Jakub Dawidek wrote:
> pjd 2007-01-28 20:29:12 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/geom/eli g_eli.c
> Log:
> 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
>
> Revision Changes Path
> 1.34 +7 -0 src/sys/geom/eli/g_eli.c
>
>
> Index: src/sys/geom/eli/g_eli.c
> diff -u src/sys/geom/eli/g_eli.c:1.33 src/sys/geom/eli/g_eli.c:1.34
> --- src/sys/geom/eli/g_eli.c:1.33 Thu Nov 2 09:01:34 2006
> +++ src/sys/geom/eli/g_eli.c Sun Jan 28 20:29:12 2007
> @@ -324,6 +324,13 @@
>
> 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)
I thought tsleep() didn't work right before !cold. Is that old knowledge?
--
Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45BD82D2.20301>
