From owner-cvs-all@FreeBSD.ORG Mon Jan 29 19:11:02 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94EF416A402; Mon, 29 Jan 2007 19:11:02 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 4FD8F13C481; Mon, 29 Jan 2007 19:11:02 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id l0TJAuh2070968; Mon, 29 Jan 2007 12:11:01 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <45BE46B7.8000406@samsco.org> Date: Mon, 29 Jan 2007 12:10:47 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20070128202917.5B67916A5A6@hub.freebsd.org> <45BD82D2.20301@root.org> <20070129175222.GA87767@garage.freebsd.pl> <45BE37DC.6080509@root.org> <20070129184522.GD87767@garage.freebsd.pl> In-Reply-To: <20070129184522.GD87767@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Mon, 29 Jan 2007 12:11:01 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 19:11:02 -0000 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 routine directly, queue a >> 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() once all CPUs are >> initialized. See sys/sys/taskqueue.h for how to add a task to the system 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. > 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!! Scott