Bug 138737 - [endian] [patch] Patch for bswap64(9) operation on IA [vendor]
Summary: [endian] [patch] Patch for bswap64(9) operation on IA [vendor]
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: i386 (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-11 14:50 UTC by Ray Kinsella
Modified: 2014-06-04 16:21 UTC (History)
1 user (show)

See Also:


Attachments
file.txt (4.90 KB, text/plain)
2009-09-11 14:50 UTC, Ray Kinsella
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Kinsella 2009-09-11 14:50:03 UTC
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

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:
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.
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2011-03-30 07:07:07 UTC
Responsible Changed
From-To: freebsd-i386->bde

hi Bruce, might I lure you into looking into this?
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-02-24 22:32:41 UTC
Responsible Changed
From-To: bde->freebsd-ports-bugs

bde has not commented on this one in quite some time, so it's time to 
turn it back over to the pool.  While here, note that it is a vendor patch.
Comment 3 Mark Linimon 2013-02-27 00:15:52 UTC
On Mon, Feb 25, 2013 at 07:09:43PM +1100, Bruce Evans wrote:
> This seems to be misclassified in ports

Actually it wasn't, it was in i386: but my fingers insisted on the wrong
reassignment.

In any case it's OBE now.  Thanks.

mcl
Comment 4 Mark Linimon 2013-02-27 00:16:11 UTC
----- Forwarded message from Bruce Evans <brde@optusnet.com.au> -----

Date: Mon, 25 Feb 2013 19:09:43 +1100 (EST)
From: Bruce Evans <brde@optusnet.com.au>
To: linimon@FreeBSD.org
cc: freebsd-ports-bugs@FreeBSD.org
Subject: Re: i386/138737: [endian] [patch] Patch for bswap64(9) operation on
	IA [vendor]

On Sun, 24 Feb 2013 linimon@FreeBSD.org wrote:

> Old Synopsis: [endian] [patch] Patch for bswap64(9) operation on IA
> New Synopsis: [endian] [patch] Patch for bswap64(9) operation on IA [vendor]
> 
> Responsible-Changed-From-To: bde->freebsd-ports-bugs
> Responsible-Changed-By: linimon
> Responsible-Changed-When: Sun Feb 24 22:32:41 UTC 2013
> Responsible-Changed-Why:
> bde has not commented on this one in quite some time, so it's time to
> turn it back over to the pool.  While here, note that it is a vendor patch.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=138737

tijl committed a more refined version.

This seems to be misclassified in ports, so I never noticed it before
but I seem to remember replying to mail about the original patch.  Maybe
that wasn't in a PR.

Bruce


----- End forwarded message -----
Comment 5 Baptiste Daroussin freebsd_committer freebsd_triage 2014-06-04 16:21:57 UTC
Seems like the issue has been fixed