From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 18:39:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED3D81D5; Tue, 31 Mar 2015 18:39:01 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54363147; Tue, 31 Mar 2015 18:39:01 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2VIcu0R059217 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 31 Mar 2015 21:38:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2VIcu0R059217 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2VIcuTo059216; Tue, 31 Mar 2015 21:38:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Mar 2015 21:38:56 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r280866 - in head/sys: amd64/amd64 i386/i386 Message-ID: <20150331183856.GT2379@kib.kiev.ua> References: <201503302013.t2UKDNCo093442@svn.freebsd.org> <20150331003850.GL2379@kib.kiev.ua> <3149031.gmIvmB3vKt@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3149031.gmIvmB3vKt@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2015 18:39:02 -0000 On Tue, Mar 31, 2015 at 12:51:04PM -0400, John Baldwin wrote: > Also, I believe that the 100 millisecond timer referred to in step 14 above is > a timeout on the entire AP-enumeration process and is the timer waited for in > step 16. It also seems that the BIOS uses broadcast (all-but-self) IPIs, > whereas FreeBSD uses targeted (wake up a single AP at a time) IPIs. Yes, I also noted that when I tried to understand why x2APIC fails in AP startup sequence. > > I don't really know if we need to increase the delays or not. I have no idea > what Intel's source for those numbers in the two documents are. I don't think > I've ever seen a rationale for why they were chosen. It might beia time to run BIST + some sloppiness for the actual initialization code. Intel claims 9.1.2 Processor Built-In Self-Test (BIST) The overhead for performing a BIST varies between processor families. For example, the BIST takes approximately 30 million processor clock periods to execute on the Pentium 4 processor. This clock count is model-specific; Intel reserves the right to change the number of periods for any Intel 64 or IA-32 processor, without notification. > > BTW, Linux seems to use the equivalent of 100 milliseconds for the > lapic_ipi_wait() stage before doing the other delays (see > native_safe_apic_wait_icr_idle() for the non-X2APIC case). My main observation is that we allow almost twice as much time for AP to start in the xAPIC mode vs. x2APIC. But increasing the delays did not helped the machines where it fails.