From owner-cvs-src@FreeBSD.ORG Mon Jan 29 22:45: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 9421516A402 for ; Mon, 29 Jan 2007 22:45:58 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id 559FF13C46B for ; Mon, 29 Jan 2007 22:45:58 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 66095 invoked from network); 29 Jan 2007 22:45:59 -0000 Received: from adsl-67-119-74-222.dsl.sntc01.pacbell.net (HELO ?10.0.0.44?) (nate-mail@67.119.74.222) by root.org with ESMTPA; 29 Jan 2007 22:45:59 -0000 Message-ID: <45BE791C.1080501@root.org> Date: Mon, 29 Jan 2007 14:45:48 -0800 From: Nate Lawson User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) 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 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 22:45:58 -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. > Fine, take my suggestion and bump it up a level. Have GEOM queue an event on a taskqueue that will be run once all CPUs are available to begin tasting. And Robert's suggestion sounds good in the long run. -- Nate