From owner-freebsd-current@FreeBSD.ORG Tue Apr 26 19:46:08 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19FAB1065672; Tue, 26 Apr 2011 19:46:08 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC848FC1D; Tue, 26 Apr 2011 19:46:07 +0000 (UTC) Received: by ewy1 with SMTP id 1so417938ewy.13 for ; Tue, 26 Apr 2011 12:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2SoU8F6F+Y4c+cEHjcVTfXRX3Dr/dF6pSv8VrWAFg3s=; b=uzomyJ5yt0SnOyiCNDcPZfgDszOnMR5UVi9pUXIaN2Ojscqfl4NOckzerHJ8n733Sb p/LfMKwQ2uVMYeY4uixNiDmKhduN2qPH3OyZ3pMM1oxPg7Gv1gW992MCewHXQlHsfW7q oU4oMBcUx7ELKSbqeX9MHwNfDOiilQg7IzSZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=OFfQe35+cvNJxdEvlzRbEA3ceokMN+J4CrRghGf9u04mXwUc+5sxxwlqS9hNiiS2qM XgjPVLeHlS+eIZOWhn2c89AZEzcUXU4Xv6qyRLqcFUnHSxQgro7VOCTTIwxlb2TZz0wQ kDhxNW19CinJ1zvD+7GSk1I2pk/iawsQRPkiM= MIME-Version: 1.0 Received: by 10.213.15.78 with SMTP id j14mr1158020eba.73.1303847166352; Tue, 26 Apr 2011 12:46:06 -0700 (PDT) Received: by 10.213.35.70 with HTTP; Tue, 26 Apr 2011 12:46:06 -0700 (PDT) In-Reply-To: <201104251458.35718.jhb@freebsd.org> References: <201104061429.50185.jhb@freebsd.org> <201104251458.35718.jhb@freebsd.org> Date: Tue, 26 Apr 2011 15:46:06 -0400 Message-ID: From: Ryan Stone To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: sched_4bsd startup crash trying to run a bound thread on an AP that hasn't started X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 19:46:08 -0000 On Mon, Apr 25, 2011 at 2:58 PM, John Baldwin 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. */