From owner-freebsd-i386@FreeBSD.ORG Fri Sep 11 13:50:03 2009 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB9641065692 for ; Fri, 11 Sep 2009 13:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A86398FC1B for ; Fri, 11 Sep 2009 13:50:03 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BDo3B3041104 for ; Fri, 11 Sep 2009 13:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8BDo3G5041103; Fri, 11 Sep 2009 13:50:03 GMT (envelope-from gnats) Resent-Date: Fri, 11 Sep 2009 13:50:03 GMT Resent-Message-Id: <200909111350.n8BDo3G5041103@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ray Kinsella Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69699106568F for ; Fri, 11 Sep 2009 13:42:48 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 582288FC16 for ; Fri, 11 Sep 2009 13:42:48 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BDgmUY059871 for ; Fri, 11 Sep 2009 13:42:48 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n8BDglKn059869; Fri, 11 Sep 2009 13:42:47 GMT (envelope-from nobody) Message-Id: <200909111342.n8BDglKn059869@www.freebsd.org> Date: Fri, 11 Sep 2009 13:42:47 GMT From: Ray Kinsella To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: i386/138737: [PATCH] Patch for bswap64 operation on IA X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2009 13:50:03 -0000 >Number: 138737 >Category: i386 >Synopsis: [PATCH] Patch for bswap64 operation on IA >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 11 13:50:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Ray Kinsella >Release: FreeBSD 8.0 Current >Organization: Intel Corporation >Environment: FreeBSD 8.0-CURRENT-200905 FreeBSD 8.0-CURRENT-200905 #1: Tue Aug 25 14:24:22 UTC 2009 root@:/usr/obj/usr/src/sys/GENERIC i386 >Description: As part of a recent development project at Intel we encountered a performance problem with the bswap64 kernel function. To resolve the issue, we rewrote the function for Intel(r) Architecture using assembly code only. This great improved the performance of the operation. The attached uuencoded file contains a tarball called "bswap64_patch.tar.gz". Enclosed in the tarball is a README with a more comprehensive set of instructions, along with:- 1. A patch to the kernel to replace the bswap64 operation with an assembly version. This patch covers swapping both constant and variable 64 bit buffers. 2. A preformance test program, to show the differential between the current code and proposed new code. 3. A unit test kernel module, to ensure after patching the bswap64 function is still working correctly. Thanks Ray Kinsella >How-To-Repeat: The enclosed tarball contains a user space program called "PerformanceTest". This program compares the performance of the original bswap64 to the proposed new version of the code. >Fix: The enclosed tarball contains a file called "endian.patch". Applying this patch and rebuilding the kernel will resolve the performance issue. The enclosed tarball contains a Kernel module called the "KernelTestModule". This module will unit test the newly built Kernel to ensure the bswap64 operation works correctly. Patch attached with submission follows: begin 644 bswap64_patch M'XL(``I:JDH``^U:>W/;-A+OO^"GV"B3#F7+$DF]'#O.C6L[K:=VG+&3NT[; M#(6V[^O#;MD_UYO.!AV M!SK:OV>0_1]MDS]2_N'V7UM;@^@FZKC=S4'']6TO<7@*`S,(W4G[G+U/..PF M$S#ZH&M;^A#_@*%I+Y6-C8UE?>>Z=;?ZFUL]779;JQ;ZAJ'1TK4^B&^`YPX? MNSX'TQS=Q-PDB)JN'YN75JA>-^%W)#%-?AUS/W(#WS1!O8603]PHYB&V)$C; M-FF39(.=F\G';@1W$F*5.QX._O0;L>CR4\FO#Z-1B])OQ7 MDD!!HFF22)#`9CV))&K"JU?WD!"1(,&!FLNEI2XX^U'B>K'K2]DMG,2,&OXE M.2^=X-82&V6:XU[$66>MHCM8Z]RK/N);SS5CBA`;+^6*TL>NC6VN[TD0$1[0 MQ<4"-JG#4XMJ,`7G6^49X!\6\C@)?=2E>4TFZ`](O]E73RL,6:XG6Q8&QA;B M1$#*"#;G`9#V1?.()K4D4)/HJ*5K-.=927,NZX#BU7200M=WV&R61<')XB)` M9=S=ITM:6X4NNX9:7G*I+LDWT*(V7@+^W/A_6]3K]\%D?5Y&K"4IYR"S#K<@ M6!5"J/C%&,LD><&MZ^T&E,I\NU/??FV?3V3WUG(JG.3.+DU2R"(KTN\J(5IT M/<>U>4U?=_CW[^+9UFF:2]"%QBJ)O"Y$+BUK405IU?S:KC0N+/!J,XJZL+X+ M`KG([U_E5?('UWB5_.$57B$7R[R90N!K[PKWV.K!0=<7!BT;>&'8=-U>YW-] MXNWH@:DLDT:,]F4WLGP76Q0,B9[&Q7_KT'55GJ!4\[_3@]W]XX.G'@/]X:#7 M*U*CN?S/Z`_Z1?[?'V+^U\6<\"OG?V$0Q(_A\Q?-_]Z1W2$.X$W(^0]G^[#9 MUF`Q<>!DW@QZ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