Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2011 15:46:06 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: sched_4bsd startup crash trying to run a bound thread on an AP that hasn't started
Message-ID:  <BANLkTin0rAJUA_eScPDG_rVsVdnjTQWAJw@mail.gmail.com>
In-Reply-To: <201104251458.35718.jhb@freebsd.org>
References:  <BANLkTinSyDaY-06N95n8c1NxOSdEnb5FkQ@mail.gmail.com> <201104061429.50185.jhb@freebsd.org> <BANLkTin9MgwyZtyiLWJsHbFxv0ihicbiEg@mail.gmail.com> <201104251458.35718.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 25, 2011 at 2:58 PM, John Baldwin <jhb@freebsd.org> wrote:
>
> Yes, I would perhaps tweak the comment to reflect the full if statement
> though. =A0Maybe something like:
>
> /*
> =A0* If SMP is started and the thread is pinned or otherwise limited to
> =A0* a specific set of CPUs, queue the thread to a per-CPU run queue.
> =A0* Otherwise, queue the thread to the global run queue.
> =A0*/

That looks fine, but I'm going to add a sentence explaining why the
smp_started condition is necessary:

/*
 * If SMP is started and the thread is pinned or otherwise limited to
 * a specific set of CPUs, queue the thread to a per-CPU run queue.
 * Otherwise, queue the thread to the global run queue.
 *
 * If SMP has not yet been started we must use the global run queue
 * as per-CPU state may not be initialized yet and we may crash if we
 * try to access the per-CPU run queues.
 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTin0rAJUA_eScPDG_rVsVdnjTQWAJw>