Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 4 May 2015 17:26:41 +0800
From: Lei Zhang <zhanglei.april@...il.com>
To: john-dev@...ts.openwall.com
Subject: Adding OpenMP support to SunMD5

Hi,

I'm trying to add OpenMP support to SunMD5. Currently I'm looking at the biggest loop in crypt_all(), which has the form:

for (round = 0; round < maxrounds; round++)
{ ... }

It seems to me this loop has loop-carried dependence, thus not feasible for direct parallelizing. I viewed the crypt() function of some other formats, whose hotspot loops mostly have this form:

for (index = 0; index < count; index++)
{ ... }

Loops like this are easy to parallelize, since each iteration is independent. There must be other formats in JtR whose hotspot loops has loop-carried dependence, like SunMD5. How did you parallelize them?


I tried parallelizing a inner loop in the hotspot loop of SunMD5, like this:

for (round = 0; round < maxrounds; round++) {
...
	#pragma omp parallel for ...
	for (idx = 0; idx < count; ++idx)
	{ ... }
...
}

But the performance is worse than single-threaded.
	Before: 628 c/s real, 628 c/s virtual
	After:    304 c/s real, 82.4 c/s virtual

The outer loop still needs efficient handling.


Lei

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ