Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EA99887.4010503@hushmail.com>
Date: Thu, 27 Oct 2011 19:44:39 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: OpenMP for MD5-crypt

2011-10-27 00:17, magnum wrote:
> 2011-10-26 09:49, Solar Designer wrote:
>> On Sat, Oct 22, 2011 at 11:45:46AM +0200, magnum wrote:
>>> OMP for crypt-MD5 would rock too. (...)
>>
>> Actually, I am tempted to do it for the slower code currently in the
>> main tree, but then I am worried that it'd make integration of faster
>> SIMD-enabled code trickier. (...)
> 
> I didn't realise plain john is not SIMD. I see now it's Bartavelle's
> code in Jumbo. But anyway, it can't be that tricky - worst-case is just
> a bunch of ifdefs.
...
>> If I do it, can I count on you for rebasing -jumbo on that updated main
>> tree (not necessarily introducing similar parallelization for its code,
>> but merely making it work like it does now)?
> 
> Sure. Actually now that I'm looking at the code again (and the Jumbo
> diff in particular) I think the coins finally fell down. As far as I can
> tell, md5cryptsse() is thread-safe already so we should be able to make
> use of OMP with SSE without much hassle.

It turned out md5cryptsse() was not thread-safe, but fixing that was
just a matter of moving a couple of global buffers into the function.
And adding OMP to MD5_fmt.c (for SSE only) was very easy once the coin
fell down. Patch uploaded to wiki as 0032. Efficiency is excellent.
Tested a lot, no problems.

I also changed x86-64.h so we use 12x when building with icc, and 8x for
gcc.

Benchmarking: FreeBSD MD5 [12x]... DONE
Raw:	28368 c/s real, 28368 c/s virtual

Benchmarking: FreeBSD MD5 [12x]... (2xOMP) DONE
Raw:	53568 c/s real, 26918 c/s virtual

magnum

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.