Date: Mon, 29 Jan 2007 18:52:22 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Nate Lawson <nate@root.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: <20070129175222.GA87767@garage.freebsd.pl> In-Reply-To: <45BD82D2.20301@root.org> References: <20070128202917.5B67916A5A6@hub.freebsd.org> <45BD82D2.20301@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Jan 28, 2007 at 09:14:58PM -0800, Nate Lawson wrote:
> 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 =3D arg;
> > sc =3D wr->w_softc;
> >+#ifdef SMP
> >+ /* Before sched_bind() to a CPU, wait for all CPUs to go on-line. */
> >+ if (sc->sc_crypto =3D=3D G_ELI_CRYPTO_SW && g_eli_threads =3D=3D 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 =3D=3D G_ELI_CRYPTO_SW && g_eli_threads =3D=3D 0)
>=20
> I thought tsleep() didn't work right before !cold. Is that old knowledge?
Hmm, I thought that cold is zeroed before smp_started is set?
--=20
Pawel Jakub Dawidek http://www.wheel.pl
pjd@FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
--+QahgC5+KEYLbs62
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
iD8DBQFFvjRWForvXbEpPzQRAl6HAKCGezkO9N+vSbpqzgd1BSGgFa1VzgCgiJuq
vRxj/4Bo8lQgMK4LMTDrvWw=
=oPK7
-----END PGP SIGNATURE-----
--+QahgC5+KEYLbs62--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070129175222.GA87767>
