From owner-svn-src-head@freebsd.org Thu Nov 30 22:16:42 2017 Return-Path: Delivered-To: svn-src-head@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 03F2ADEACA4; Thu, 30 Nov 2017 22:16:42 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AE8379060; Thu, 30 Nov 2017 22:16:40 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from hermann ([92.227.90.189]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LuP5z-1f4QGF1cM3-011hRW; Thu, 30 Nov 2017 23:16:32 +0100 Date: Thu, 30 Nov 2017 23:16:31 +0100 From: "Hartmann, O." To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326376 - head/sys/kern Message-ID: <20171130231627.2eecc273@hermann> In-Reply-To: <201711292328.vATNSeOM046518@repo.freebsd.org> References: <201711292328.vATNSeOM046518@repo.freebsd.org> Organization: walstatt.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:wQ7fpRQOztV8ZPyilQbmyBfQM41e/z56Vti/l7hZT3KgoMsmugE CABIixUPLIHeul1WYd0gN/2j6LSWjrYoD4WgaKDrIM5WviMdc/StuSCOi75aeIPNRWFgTqj WIxnNeFT03S4+QGt5PiH6R4pV8/+NN+vmjZAy4NH+uPzB8jZtmEpV5s0hBmnw01MBWxjhkZ EXYKSGmcmbXy1vKcS7XOA== X-UI-Out-Filterresults: notjunk:1;V01:K0:UqX2EzMJJcs=:m1NeRFQyqNSD4wUme6YMiH zxb2fBY/EfqyPlhRXF6ArzG6RRgakXqO2o5WTpDR7Pvq30QFdGeQFMT5MedGbb8uoW7IyNJXh NjG4NS7WjJbynsMlqZcTQq/JC3DKJ8Vtbz/xNbCXHP41R3eve9kxbR4Du/mTZOUxWhAtzPQRs jX9o4VA5yQ1/uKkeJ1CztySfBBOfihhiwwXILNpkUTxi1sw1kQoU7F1tRq+altGzGBtFa5wx1 UkVX8bpY+h4y/6hoIJ+q+o0GH/z2lS2c+ncKw8Z+HvolVNag2Mj3SpmDK6vxjGTybxmLKNOx2 kfkiobxFcvZJeviknW6NGpU7JDCPq+4QXlodz3SkpiRMo62NgcK3ZMa5UfWRtZZdixaQVuPm8 6tDnwVrpzXTpWjrGUzlC9pYzKLTHIAn2d4id5iTyo/9U+3z/fwslC2Ltf8+m8IKrNx4SgxUNB SM3ASUMwFyV2us7wqVYORiQyvM85igPObYlYpNS7cprD0oxg6U0V5ImpNpfFB4cghAdFK4kJq 3C1iyU2mxnuFxZ3+vwqTfJsoESukROQ29nPS7Ho1KxvgYnd2HHz+BaSIYq8nLC4DMXZ6Y0dmH ZzpRQisxj9BKt5/PgYlIGVVrtgdslXYchoBgG4O1C3BNGrp+JiisbxNhEZi+O5s8S54x0rmWI mPORwPcqQVljnj5w4fRTLeLOQ3pCK+7qM199G8V6yH2cDWBvS5hd/JdG/07t25BdBYWOSsEXV fhf/OG4c3tesA6fHlcswO4Z2hzLftuR1MNlzD+D4OUdgwQPhchAZM/Hjc76FZA+49OuC/qSS+ WdZsYzL8AOwzdrz/6L6A7lrD+tz1NbfIh9RfWK3EWX+2YqBnFE= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2017 22:16:42 -0000 On Wed, 29 Nov 2017 23:28:40 +0000 (UTC) Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Nov 29 23:28:40 2017 > New Revision: 326376 > URL: https://svnweb.freebsd.org/changeset/base/326376 > > Log: > The sched_add() function is not only used when the thread is > initially started, but also by the turnstiles to mark a thread as > runnable for all locks, for instance sleepqueues do: > setrunnable()->sched_wakeup()->sched_add() > > In r326218 code was added to allow booting from non-zero CPU numbers > by setting the ts_cpu field inside the ULE scheduler's sched_add() > function. This had an undesired side-effect that prior sched_pin() > and sched_bind() calls got disregarded. This patch fixes the > initialization of the ts_cpu field for the ULE scheduler to only > happen once when the initial thread is constructed during system > init. Forking will then later on ensure that a valid ts_cpu value > gets copied to all children. > > Reviewed by: jhb, kib > Discussed with: nwhitehorn > MFC after: 1 month > Differential revision: https://reviews.freebsd.org/D13298 > Sponsored by: Mellanox Technologies > > Modified: > head/sys/kern/sched_ule.c > > Modified: head/sys/kern/sched_ule.c > ============================================================================== > --- head/sys/kern/sched_ule.c Wed Nov 29 21:16:14 2017 > (r326375) +++ head/sys/kern/sched_ule.c Wed Nov 29 23:28:40 > 2017 (r326376) @@ -1405,7 +1405,6 @@ sched_setup(void *dummy) > > /* Add thread0's load since it's running. */ > TDQ_LOCK(tdq); > - td_get_sched(&thread0)->ts_cpu = curcpu; /* Something valid > to start */ thread0.td_lock = TDQ_LOCKPTR(TDQ_SELF()); > tdq_load_add(tdq, &thread0); > tdq->tdq_lowpri = thread0.td_priority; > @@ -1642,6 +1641,7 @@ schedinit(void) > ts0->ts_ltick = ticks; > ts0->ts_ftick = ticks; > ts0->ts_slice = 0; > + ts0->ts_cpu = curcpu; /* set valid CPU number */ > } > > /* > @@ -2453,7 +2453,6 @@ sched_add(struct thread *td, int flags) > * Pick the destination cpu and if it isn't ours transfer to > the > * target cpu. > */ > - td_get_sched(td)->ts_cpu = curcpu; /* Pick something valid > to start */ cpu = sched_pickcpu(td, flags); > tdq = sched_setcpu(td, cpu, flags); > tdq_add(tdq, td, flags); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org" The patch doesn't solve problems for me when either tmpfs is used as a loaded kernel module or compiled into the kernel and the filesystem contains mount points comprised from tempfs, like /tmp or /var/run. Any kernel with tmpfs compiled in seems to crash, any kernel, including GENERIC, seems also to crash when any tempfs is involved. After nearly two days I managed to boot one box again, figuring that tempfs triggers a kernel panic. oh