From owner-freebsd-current@FreeBSD.ORG Fri Jul 9 17:12:57 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ED3016A4CE for ; Fri, 9 Jul 2004 17:12:57 +0000 (GMT) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 123EA43D5C for ; Fri, 9 Jul 2004 17:12:57 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 15199 invoked from network); 9 Jul 2004 17:12:56 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 9 Jul 2004 17:12:56 -0000 Received: from 10.50.41.229 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i69HCq1u088645; Fri, 9 Jul 2004 13:12:52 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-current@FreeBSD.org Date: Fri, 9 Jul 2004 13:14:07 -0400 User-Agent: KMail/1.6 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200407091314.07506.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: kris@FreeBSD.org cc: Gerrit Nagelhout cc: Julian Elischer Subject: Re: STI, HLT in acpi_cpu_idle_c1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 09 Jul 2004 17:12:57 -0000 On Thursday 08 July 2004 08:41 pm, Gerrit Nagelhout wrote: > John Baldwin wrote: > > I think it does handle the interrupt, but that the EOI is > > somehow lost or > > ignored,or that somehow we don't send an EOI in some edge case. > > I switched the 2 CPUs on the system, and the problem did not > track the CPU, so it is unlikely to be a hardware problem. > I've been looking through the interrupt code, and one thing > seems very suspicious, and I am hoping that someone can shed > some light on it ... ie whether it's legal or not. > In apic_vector.s, some of the interrupt handlers (hardclock, > cpuast, and a few others) call doreti. Under certain conditions, > this can call ast(). The ast function can call PROC_LOCK, > which is a sleep mutex. > What would happen in this case? How could the interrupt > possibly block? At this point, the interrupt handler has > already called eoi, but not iret. Would the processor except > other interrupts, or get stuck? > Thanks, Once the EOI is sent to the APIC, the processor will except other interrupts. However, most of the interrupt code also runs with interrupts disabled. The exception is in ast(), meaning that another interrupt can come in and nest during an ast(), but ast() is not called during nested returns, so it won't nest infinitely. iret doesn't do any sort of EOI magic, all it does is popf followed by ret. The popf usually enables interrupts when it restores the interrupt flag's state. It might still be a hardware problem in the chipset, esp. since it always happens on a logical CPU. The fact that no other boxes in the field besides the two identical boxes you have have demonstrated this problem makes me very suspicious with respect to the hardware. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org