Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 50522 invoked from network); 3 Jan 2007 10:31:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2007 10:31:23 -0000 Received: (qmail 27280 invoked by uid 500); 3 Jan 2007 10:31:29 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 27237 invoked by uid 500); 3 Jan 2007 10:31:28 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 27224 invoked by uid 99); 3 Jan 2007 10:31:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2007 02:31:28 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jorton@redhat.com designates 66.187.233.31 as permitted sender) Received: from [66.187.233.31] (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2007 02:31:19 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l03AUvPZ018058; Wed, 3 Jan 2007 05:30:57 -0500 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l03AUpPf022442; Wed, 3 Jan 2007 05:30:52 -0500 Received: from radish.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by radish.cambridge.redhat.com (8.13.8/8.13.7) with ESMTP id l03AUpKV010909; Wed, 3 Jan 2007 10:30:51 GMT Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.8/8.13.8/Submit) id l03AUooY010908; Wed, 3 Jan 2007 10:30:50 GMT Date: Wed, 3 Jan 2007 10:30:50 +0000 From: Joe Orton To: dev@apr.apache.org Cc: Justin Erenkrantz Subject: Re: [PATCH] Optimized MD5 implementation from OpenSSL Message-ID: <20070103103050.GA10268@redhat.com> Mail-Followup-To: dev@apr.apache.org, Justin Erenkrantz References: <20070102220102.GB3226@bourbon.ics.uci.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20070102220102.GB3226@bourbon.ics.uci.edu> User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Jan 02, 2007 at 02:01:02PM -0800, Justin Erenkrantz wrote: > One of the bottlenecks that keeps popping up in Subversion is the speed of > the MD5 checksums. OpenSSL has put in some work to have optimized MD5 > implementations and with David's recent work to detect OpenSSL. we can just > defer to their implementations. For AMD64/EMT64 CPUs, we can leverage > their optimized implementation (which goes from ~250MB/sec to ~370MB/sec). > > However, the big annoying thing is that we declared apr_md5_ctx_t in > apr_md5.h so it's not an opaque value. Luckily for us though, > OpenSSL's MD5 context is smaller than APR's - so an ugly hack works. This would need to have some severe future-proofing to be safe against any change to MD5_CTX in future versions of OpenSSL, e.g. only using it for the specific sizeof() that structure as currently defined. (that would cover the cases where MD5_LONG is currently not 32-bit too) 1. is having an ENOTIMPL _set_xlate really an excusable regression? 2. is it intended that the return values from the OpenSSL MD5_* functions are ignored? (can those functions even use the OpenSSL error stack and all the mess that entails?) 3. does this mean that apr_md5_* can only be guaranteed to work after apu_ssl_init() has been called? joe