From owner-svn-src-head@FreeBSD.ORG Thu May 12 10:44:03 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C44CC1065670; Thu, 12 May 2011 10:44:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 04A748FC13; Thu, 12 May 2011 10:44:01 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA23752; Thu, 12 May 2011 13:43:59 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DCBB9EE.8070809@FreeBSD.org> Date: Thu, 12 May 2011 13:43:58 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110504 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Stanislav Sedov References: <201105091734.p49HY0P3006180@svn.freebsd.org> <20110512024956.996cd973.stas@FreeBSD.org> In-Reply-To: <20110512024956.996cd973.stas@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jung-uk Kim Subject: Re: svn commit: r221703 - in head/sys: amd64/include i386/include x86/isa x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 12 May 2011 10:44:03 -0000 on 12/05/2011 12:49 Stanislav Sedov said the following: > On Mon, 9 May 2011 17:34:00 +0000 (UTC) > Jung-uk Kim mentioned: > >> Author: jkim >> Date: Mon May 9 17:34:00 2011 >> New Revision: 221703 >> URL: http://svn.freebsd.org/changeset/base/221703 >> >> Log: >> Implement boot-time TSC synchronization test for SMP. This test is executed >> when the user has indicated that the system has synchronized TSCs or it has >> P-state invariant TSCs. For the former case, we may clear the tunable if it >> fails the test to prevent accidental foot-shooting. For the latter case, we >> may set it if it passes the test to notify the user that it may be usable. >> > > Hi, Jung-uk! > > My kernel no longer boots on my Dual Xeon Dell Precision after this > commit. It hangs immediately after the "AP launched" messages. > > I uploaded my verbose boot log from the old kernel to > http://www.SpringDaemons.com/stas/boot.verbose I believe that this was the first stress test for smp_rendezvous() that has uncovered a bug in it. I think that a fix similar to what I committed in my xcpu branch is needed. Theory: - smp_rv_waiters[2] becomes equal to smp_rv_ncpus - [at least] one slave CPU is still in the last call to cpu_spinwait() in smp_rendezvous_action() - master CPU notices that the condition is true, exits smp_rendezvous_cpus() and calls it again - the slave CPU is still in spinwait - the master CPU resets smp_rv_waiters[2] to zero - the slave CPU exits spinwait, see smp_rv_waiters[2] with zero value - endless loop -- Andriy Gapon