From owner-freebsd-arm@FreeBSD.ORG Sat May 16 23:34:12 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6561FD7E for ; Sat, 16 May 2015 23:34:12 +0000 (UTC) Received: from smtp.rcn.com (smtp.rcn.com [69.168.97.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20DBF1271 for ; Sat, 16 May 2015 23:34:11 +0000 (UTC) X_CMAE_Category: , , X-CNFS-Analysis: v=2.0 cv=de4CLAre c=1 sm=1 a=kLIaxcRmAfIWWG5Fo3VFTQ==:17 a=OA2lqS22AAAA:8 a=ozQi6Qy7AAAA:8 a=y7i5u2evIU6otM4zWmkA:9 a=QEXdDO2ut3YA:10 a=mKDQe7SI8UQN-VzKbzsA:9 a=_W_S_7VecoQA:10 a=kLIaxcRmAfIWWG5Fo3VFTQ==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZS5tb2VAcmNuLmNvbQ== Authentication-Results: smtp02.rcn.cmh.synacor.com smtp.mail=e.moe@rcn.com; spf=neutral; sender-id=neutral Authentication-Results: smtp02.rcn.cmh.synacor.com header.from=e.moe@rcn.com; sender-id=neutral Authentication-Results: smtp02.rcn.cmh.synacor.com smtp.user=e.moe; auth=pass (PLAIN) Received-SPF: neutral (smtp02.rcn.cmh.synacor.com: 24.148.20.83 is neither permitted nor denied by domain of rcn.com) Received: from [24.148.20.83] ([24.148.20.83:13409] helo=[192.168.1.175]) by smtp.rcn.com (envelope-from ) (ecelerity 3.6.2.43620 r(Platform:3.6.2.0)) with ESMTPSA (cipher=AES256-SHA) id 02/44-42960-C3FC7555; Sat, 16 May 2015 19:14:04 -0400 From: Erik Moe Subject: RPI2 performance comparison using LINPACK Message-Id: <1B7FC791-3DEE-4310-8BE0-BBB3C8E34C78@rcn.com> Date: Sat, 16 May 2015 18:14:03 -0500 To: freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 23:34:12 -0000 I=E2=80=99ve been lurking on this list for a while. I got interested = in the discussion about RPI2 performance on FreeBSD and how it compared = to Linux. I found this source code for LINPACK and thought it would be = good for comparison: http://www.netlib.org/benchmark/linpackc.new = . I built FreeBSD using = crochet and 11.0-CURRENT. For my Linux system I used Raspbian, the = 2015-05-05 release. First for the Linux results, I complied LINPACK = using =E2=80=9Cgcc -O3 -o linpack linpack.c -lm=E2=80=9D: Enter array size (q to quit) [200]: =20 Memory required: 315K. LINPACK benchmark, Double precision. Machine precision: 15 digits. Array size 200 X 200. Average rolled and unrolled performance: Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS ---------------------------------------------------- 64 0.84 90.48% 3.57% 5.95% 111257.384 128 1.69 90.53% 1.78% 7.69% 112683.761 256 3.38 90.24% 2.66% 7.10% 111966.030 512 6.76 95.27% 1.78% 2.96% 107186.992 1024 13.52 90.31% 2.81% 6.88% 111699.232 Then I ran the same on FreeBSD, using the same options: "cc -O3 -o = linpack linpack.c -lm=E2=80=9D: Enter array size (q to quit) [200]: =20 Memory required: 315K. LINPACK benchmark, Double precision. Machine precision: 15 digits. Array size 200 X 200. Average rolled and unrolled performance: Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS ---------------------------------------------------- 8 0.70 92.22% 3.33% 4.44% 16352.248 16 1.41 92.78% 2.22% 5.00% 16447.875 32 2.79 92.16% 3.08% 4.76% 16544.627 64 5.59 92.03% 2.80% 5.17% 16593.432 128 11.18 91.75% 2.87% 5.38% 16617.942 Then I recompiled LINPACK for FreeBSD using =E2=80=9Ccc -O3 -o linpack = linpack.c -lm -mfloat-abi=3Dsoftfp=E2=80=9D: Enter array size (q to quit) [200]: =20 Memory required: 315K. LINPACK benchmark, Double precision. Machine precision: 15 digits. Array size 200 X 200. Average rolled and unrolled performance: Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS ---------------------------------------------------- 32 0.60 87.01% 0.00% 12.99% 83957.811 64 1.21 86.45% 4.52% 9.03% 79789.693 128 2.43 89.71% 2.57% 7.72% 78399.628 256 4.85 90.82% 2.74% 6.44% 77455.055 512 9.71 89.86% 3.14% 7.00% 77857.070 1024 19.48 90.53% 3.13% 6.34% 77090.170 Then finally I enabled powerd on FreeBSD and ran LINPACK with the same = compile options, =E2=80=9Ccc -O3 -o linpack linpack.c -lm = -mfloat-abi=3Dsoftfp=E2=80=9D: Enter array size (q to quit) [200]: =20 Memory required: 315K. LINPACK benchmark, Double precision. Machine precision: 15 digits. Array size 200 X 200. Average rolled and unrolled performance: Reps Time(s) DGEFA DGESL OVERHEAD KFLOPS ---------------------------------------------------- 64 0.81 95.19% 1.92% 2.88% 111389.571 128 1.62 89.37% 4.83% 5.80% 115388.171 256 3.23 91.06% 2.42% 6.52% 116282.653 512 6.47 89.86% 3.02% 7.13% 117038.717 1024 12.97 90.54% 3.31% 6.14% 115536.294 The FreeBSD results were very similar to Linux as long as it was = compiled with "-mfloat-abi=3Dsoftfp=E2=80=9D and the cpu is running at = the full 900Mhz. I tried to compile the Linux version of LINPACK using = "-mfloat-abi=3Dsoft=E2=80=9D, but got the error "linpack uses VFP = register arguments, /tmp/cc24nslQ.o does not=E2=80=9D, so I assume that = it doesn=E2=80=99t support a soft floating-point implementation. = FreeBSD must default to "-mfloat-abi=3Dsoft=E2=80=9D. Raspbian must = default to "-mfloat-abi=3Dhard=E2=80=9D because that=E2=80=99s the only = option that would work neither "-mfloat-abi=3Dsoft=E2=80=9D or = -mfloat-abi=3Dsoftfp=E2=80=9D would link. Will hard float work for = FreeBSD if I compile with "TARGET_ARCH=3Darmv6hf=E2=80=9D? Erik