From owner-cvs-src@FreeBSD.ORG Mon Jan 29 17:53:15 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DF5116A401; Mon, 29 Jan 2007 17:53:15 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id EE6AE13C481; Mon, 29 Jan 2007 17:53:14 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id BB8E14569A; Mon, 29 Jan 2007 18:53:12 +0100 (CET) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 4443445683; Mon, 29 Jan 2007 18:53:07 +0100 (CET) Date: Mon, 29 Jan 2007 18:52:22 +0100 From: Pawel Jakub Dawidek To: Nate Lawson Message-ID: <20070129175222.GA87767@garage.freebsd.pl> References: <20070128202917.5B67916A5A6@hub.freebsd.org> <45BD82D2.20301@root.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <45BD82D2.20301@root.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/geom/eli g_eli.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 17:53:15 -0000 --+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 > > 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--