Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 17 Sep 2015 01:29:49 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: multi-threaded hash table initialization

On Thu, Sep 17, 2015 at 01:18:41AM +0300, Solar Designer wrote:
> I think we can commit it and give it some more testing.  There might be
> regressions for other cases, especially multi-salt with small per-salt
> hash tables - maybe we need to add a check for that (would need to come
> up with a hash table size threshold).

Also, maybe we need to require at least 6 original threads before we use
our 3 threads.  So change:

	if (john_omp_threads_orig < 3)
		goto single_threaded;

to:

	if (john_omp_threads_orig < 6)
		goto single_threaded;

so that we don't go for the multi-threaded approach on dual-core with
2 hardware threads/core, where the 3 threads would end up sharing 2
physical cores, and with them doing some duplicate work they'd likely
end up running slower than the single-threaded code.

OTOH, there are also perfectly fine quad-core systems without SMT, where
the multi-threaded approach is likely beneficial.  So I'm not sure.

Alexander

Powered by blists - more mailing lists

Your e-mail address:

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