From owner-freebsd-alpha Thu Sep 5 13:13:32 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 468A737B400; Thu, 5 Sep 2002 13:13:25 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3396D43E72; Thu, 5 Sep 2002 13:13:24 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id QAA08598; Thu, 5 Sep 2002 16:13:23 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g85KCrM58560; Thu, 5 Sep 2002 16:12:53 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15735.47813.266130.216534@grasshopper.cs.duke.edu> Date: Thu, 5 Sep 2002 16:12:53 -0400 (EDT) To: John Baldwin Cc: freebsd-alpha@FreeBSD.org, ticso@cicely.de Subject: Re: alpha performance on -current In-Reply-To: References: <15735.31557.85006.684144@grasshopper.cs.duke.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org OK, if the appended is what you had in mind, then I'm a much happier camper. This patch: 8314.06 real 7025.32 user 956.14 sys Stock kernel: 8699.25 real 6985.64 user 1379.72 sys A 30% reduction in system time is pretty good. Cheers, Drew Index: include/atomic.h =================================================================== RCS file: /home/ncvs/src/sys/alpha/include/atomic.h,v retrieving revision 1.14 diff -u -r1.14 atomic.h --- include/atomic.h 17 May 2002 05:45:39 -0000 1.14 +++ include/atomic.h 5 Sep 2002 17:03:21 -0000 @@ -55,7 +55,6 @@ "bis %0, %3, %0\n\t" /* calculate new value */ "stl_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -73,7 +72,6 @@ "bic %0, %3, %0\n\t" /* calculate new value */ "stl_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -91,7 +89,6 @@ "addl %0, %3, %0\n\t" /* calculate new value */ "stl_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -109,7 +106,6 @@ "subl %0, %3, %0\n\t" /* calculate new value */ "stl_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -130,7 +126,7 @@ "beq %1,2f\n\t" /* if the store failed, spin */ "br 3f\n" /* it worked, exit */ "2:\tbr 1b\n" /* *addr not updated, loop */ - "3:\tmb\n" /* it worked */ + "3:\n" /* it worked */ : "=&r"(result), "=&r"(temp), "=m" (*addr) : "m"(*addr) : "memory"); @@ -147,7 +143,6 @@ "bis %0, %3, %0\n\t" /* calculate new value */ "stq_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -165,7 +160,6 @@ "bic %0, %3, %0\n\t" /* calculate new value */ "stq_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -183,7 +177,6 @@ "addq %0, %3, %0\n\t" /* calculate new value */ "stq_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -201,7 +194,6 @@ "subq %0, %3, %0\n\t" /* calculate new value */ "stq_c %0, %1\n\t" /* attempt to store */ "beq %0, 2f\n\t" /* spin if failed */ - "mb\n\t" /* drain to memory */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "2:\tbr 1b\n" /* try again */ ".previous\n" @@ -222,7 +214,7 @@ "beq %1,2f\n\t" /* if the store failed, spin */ "br 3f\n" /* it worked, exit */ "2:\tbr 1b\n" /* *addr not updated, loop */ - "3:\tmb\n" /* it worked */ + "3:\n" /* it worked */ : "=&r"(result), "=&r"(temp), "=m" (*addr) : "m"(*addr) : "memory"); @@ -257,7 +249,7 @@ atomic_##NAME##_acq_##WIDTH(volatile u_int##WIDTH##_t *p, u_int##WIDTH##_t v)\ { \ atomic_##NAME##_##WIDTH(p, v); \ - /* alpha_mb(); */ \ + alpha_mb(); \ } \ \ static __inline void \ @@ -271,7 +263,7 @@ atomic_##NAME##_acq_##TYPE(volatile u_int##WIDTH##_t *p, u_int##WIDTH##_t v)\ { \ atomic_##NAME##_##WIDTH(p, v); \ - /* alpha_mb(); */ \ + alpha_mb(); \ } \ \ static __inline void \ @@ -361,7 +353,6 @@ "mov %3, %0\n\t" /* value to store */ "stl_c %0, %1\n\t" /* attempt to store */ "beq %0, 3f\n\t" /* if it failed, spin */ - "mb\n\t" /* drain to memory */ "2:\n" /* done */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "3:\tbr 1b\n" /* try again */ @@ -390,7 +381,6 @@ "mov %3, %0\n\t" /* value to store */ "stq_c %0, %1\n\t" /* attempt to store */ "beq %0, 3f\n\t" /* if it failed, spin */ - "mb\n\t" /* drain to memory */ "2:\n" /* done */ ".section .text3,\"ax\"\n" /* improve branch prediction */ "3:\tbr 1b\n" /* try again */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message