Date: Fri, 02 Sep 2005 13:58:35 -0400 From: Ben Thomas <bthomas@virtualiron.com> To: freeBSD-gnats-submit@FreeBSD.org Subject: i386/85653: [patch] relieve hangs in tight loops in processor support Message-ID: <431892CB.5060800@virtualiron.com> Resent-Message-ID: <200509021800.j82I0aZY055237@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 85653 >Category: i386 >Synopsis: [patch] relieve hangs in tight loops in processor support >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Sep 02 18:00:36 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Ben Thomas >Release: FreeBSD 5.4-RELEASE i386 >Organization: Virtual Iron Software >Environment: System: FreeBSD bthomas4.katana-technology.com 5.4-RELEASE FreeBSD 5.4-RELEASE #10: Sun Aug 28 13:48:00 EDT 2005 ben@bthomas4.katana-technology.com:/usr/obj/usr/home/ben/BSD/RELENG_5_4_0_RELEASE/src/sys/BEN i386 >Description: This is one of a few changes we've made to relieve hangs in SMP systems. We've seen hangs for stop/start CPUs, during reboots and at other inopportune times. Generally, the hangs are pretty hard and have been interesting to debug. In the end, we isolated a number of places and inserted a "pause" instruction to break very tight data access loops. This has resolved our issues. We have some other patches to help with these issues, but they probably need more clean-up before attempting to submit them. This patch is against the 5_4_0_RELEASE code >How-To-Repeat: >Fix: --- apic_vector.s-DIFF begins here --- --- /usr/src.original/sys/i386/i386/apic_vector.s Wed Jan 5 21:02:35 2005 +++ /usr/src/sys/i386/i386/apic_vector.s Thu Aug 11 17:36:09 2005 @@ -288,6 +288,7 @@ btsl %eax, CNAME(stopped_cpus) /* stopped_cpus |= (1<<id) */ 1: btl %eax, CNAME(started_cpus) /* while (!(started_cpus & (1<<id))) */ + pause /* Give others a chance ! */ jnc 1b lock --- apic_vector.s-DIFF ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?431892CB.5060800>