cvs commit: src/sys/geom/eli g_eli.c

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Jan 29 19:32:58 UTC 2007


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 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!!

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.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20070129/295ad728/attachment.pgp


More information about the cvs-src mailing list