From owner-freebsd-current@freebsd.org Sat Jul 30 07:44:28 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39044BA82E7 for ; Sat, 30 Jul 2016 07:44:28 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 1694019F9 for ; Sat, 30 Jul 2016 07:44:28 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 12451BA82E0; Sat, 30 Jul 2016 07:44:28 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FA6BBA82D8 for ; Sat, 30 Jul 2016 07:44:28 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CABF19F8; Sat, 30 Jul 2016 07:44:27 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id x83so18598673wma.3; Sat, 30 Jul 2016 00:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=GEI435x9zVHlnmSVo3pTVjJ2ty4hRZ+UvsWhUuQXD0A=; b=pxHnsRkXS+QyPE7PEs9YC3ZT91QxZnYProwQSsOurm27ywx7eQhVdI8nJcgBua25M7 j2fsAszz+sSS0GQj0rV5n6IwzPY1Q/1pkzGuwl4REsGfB0AR9+uWFUkxgRwynGPpPk3y WGApZ53cuLZzyUAOI5+hdLLGsoEcTgr+8n54uN2QYjAWRKRnI4V98cSYsufrcGZE8S4n TVBpcw7DlJttD3svMPHqM2pjgC5O05vnt+y3GW7YNNX7U4iKoWY66jSgKXEhefBjC0/q OQhtKwyU88qk0Sg+Gp7IAFumW1u4svWxv/KT2MJsQ56nbjx3BlCK5YOU7g5vY8qkxP4L cRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=GEI435x9zVHlnmSVo3pTVjJ2ty4hRZ+UvsWhUuQXD0A=; b=ROk1eThPf3FR7RNYFii4ddyDkLLmWfBW9YDdBZixx6fFzqkz2K+mL3IgVpcvoybJMA oJEE1LuYkihmFgjVzWjesnZYxvKeZRJGEKn6iz/jQP8S5+wFQ8pFO65lzC3IktARadfL sKRJsXEU9gOYWpuStwHxjVJW4VG//mpFt6iB5oPa95otcaiB/Jqs8CbAyElpPFI5AC5F 7orH8LZ2ygtNQxY9527gSUlIqg7qQVThHn8BWlSSdXhRR3+BBuPksw5HilUb5weRbKu3 Px/0+5J9a9/loW69Mn8kDLbmupVMowgcijLNQB6THSNR/lHxpdTSrDA80Lmm52jdRbet /0QA== X-Gm-Message-State: AEkoouud/JYz2bSYP+SDMNuSOdk7/9JPf07/LBPIpzxSv7i/CygCI7Z1RCIW0S/J6Vh46g== X-Received: by 10.28.98.135 with SMTP id w129mr46284040wmb.38.1469864665149; Sat, 30 Jul 2016 00:44:25 -0700 (PDT) Received: from ernst.home (p4FCA79BE.dip0.t-ipconnect.de. [79.202.121.190]) by smtp.gmail.com with ESMTPSA id v203sm6556826wmv.2.2016.07.30.00.44.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jul 2016 00:44:24 -0700 (PDT) Date: Sat, 30 Jul 2016 09:44:22 +0200 From: Gary Jennejohn To: John Baldwin Cc: current@freebsd.org Subject: Re: EARLY_AP_STARTUP hangs during boot Message-ID: <20160730094422.68e1b8db@ernst.home> In-Reply-To: <2732687.Cf9hD9SkSs@ralph.baldwin.cx> References: <20160516122242.39249a54@ernst.home> <1758017.P1iqL9uSnF@ralph.baldwin.cx> <20160728003131.1f67bb78@ernst.home> <2732687.Cf9hD9SkSs@ralph.baldwin.cx> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 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: Sat, 30 Jul 2016 07:44:28 -0000 On Fri, 29 Jul 2016 13:17:42 -0700 John Baldwin wrote: > On Thursday, July 28, 2016 12:31:31 AM Gary Jennejohn wrote: > > Well, now I know that ULE is a prerequiste for EARLY_AP_STARTUP! I > > wasn't aware of that. I prefer BSD and that's the scheduler I did > > the first tests with. > > > > But with the ULE scheduler the system comes up all the way. > > > > It would be nice if the BSD scheduler could also be modified to > > work with EARLY_AP_STARTUP. > > I wasn't able to reproduce your hang with 4BSD, but I think I see a > possible problem. Try this: > > diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c > index 7de56b6..d53331a 100644 > --- a/sys/kern/sched_4bsd.c > +++ b/sys/kern/sched_4bsd.c > @@ -327,7 +327,6 @@ maybe_preempt(struct thread *td) > * - The current thread has a higher (numerically lower) or > * equivalent priority. Note that this prevents curthread from > * trying to preempt to itself. > - * - It is too early in the boot for context switches (cold is set). > * - The current thread has an inhibitor set or is in the process of > * exiting. In this case, the current thread is about to switch > * out anyways, so there's no point in preempting. If we did, > @@ -348,7 +347,7 @@ maybe_preempt(struct thread *td) > ("maybe_preempt: trying to run inhibited thread")); > pri = td->td_priority; > cpri = ctd->td_priority; > - if (panicstr != NULL || pri >= cpri || cold /* || dumping */ || > + if (panicstr != NULL || pri >= cpri /* || dumping */ || > TD_IS_INHIBITED(ctd)) > return (0); > #ifndef FULL_PREEMPTION > @@ -1127,7 +1126,7 @@ forward_wakeup(int cpunum) > if ((!forward_wakeup_enabled) || > (forward_wakeup_use_mask == 0 && forward_wakeup_use_loop == 0)) > return (0); > - if (!smp_started || cold || panicstr) > + if (!smp_started || panicstr) > return (0); > > forward_wakeups_requested++; > Thanks, but with this patch the kernel hangs in exactly the same place as before - after the HPET output. Maybe I'm missing some kernel option which ULE works around, or something like that. -- Gary Jennejohn