From owner-cvs-src@FreeBSD.ORG Mon Jan 29 19:32:58 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 B2A0E16A404; Mon, 29 Jan 2007 19:32:58 +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 1769913C4A3; Mon, 29 Jan 2007 19:32:57 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 40FB146DA5; Mon, 29 Jan 2007 20:32:56 +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 66C3B456B1; Mon, 29 Jan 2007 20:32:50 +0100 (CET) Date: Mon, 29 Jan 2007 20:32:05 +0100 From: Pawel Jakub Dawidek To: Scott Long Message-ID: <20070129193205.GE87767@garage.freebsd.pl> References: <20070128202917.5B67916A5A6@hub.freebsd.org> <45BD82D2.20301@root.org> <20070129175222.GA87767@garage.freebsd.pl> <45BE37DC.6080509@root.org> <20070129184522.GD87767@garage.freebsd.pl> <45BE46B7.8000406@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a+b56+3nqLzpiR9O" Content-Disposition: inline In-Reply-To: <45BE46B7.8000406@samsco.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, Nate Lawson 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 19:32:58 -0000 --a+b56+3nqLzpiR9O Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 29, 2007 at 12:10:47PM -0700, Scott Long wrote: > Pawel Jakub Dawidek wrote: > >On Mon, Jan 29, 2007 at 10:07:24AM -0800, Nate Lawson wrote: > >>Pawel Jakub Dawidek wrote: > >>>Hmm, I thought that cold is zeroed before smp_started is set? > >>I don't think that's guaranteed. Besides, there's an easier way to fix= your problem. Instead of calling kthread_create() from your geom create r= outine directly, queue a=20 > >>stub request on the thread taskqueue to call kthread_create(). > >> > >>For example, see sys/dev/acpica/acpi_acad.c. We call this from attach(= ) and then the system thread only runs and then calls acpi_acad_init() o= nce all CPUs are=20 > >>initialized. See sys/sys/taskqueue.h for how to add a task to the syst= em thread taskqueue: > >> > >>taskqueue_enqueue(taskqueue_thread, &task); > >If we want to fix it better, I think GEOM should start (tasting at > >least) after all CPUs are online. >=20 > Why? You're proposing yet another intrusive change to the kernel to > handle yet another one-off requirement of your code. Why not do what I > suggested before with hooking the appropriate SYSINIT in your module? > Or why not follow Robert's suggestion and implement a simple event > mechanism so that any module can know when a CPU has come online or > offline. Heck, you probably don't even need to implement a new > mechanism, just hook the existing EVENTHANLER mechanism. That's what > it's designed for!! I'm afraid Scott that your proposals are hacks. As a GEOM class I should not use SYSINIT, EVENTHANDLER, etc. I shouldn't bother if CPUs are online or not. All events I need to implement a GEOM class I should receive from the infrastructure. Also I shouldn't be called by the infrastructure when the system is not yet ready for my activity, that's why I proposed to implement this functionality in the infrastructure (ie. delay GEOM tasting machanism), that hack SYSINITs in every single GEOM class that need to bind to a CPU. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --a+b56+3nqLzpiR9O Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFvku1ForvXbEpPzQRAtg4AJ9EjxQcYPPXqUX2BDB/9rg91zzljQCeI7// qSKFChwLXqtQxlT1poy4oeA= =IVA5 -----END PGP SIGNATURE----- --a+b56+3nqLzpiR9O--