Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 22 Dec 2012 20:12:27 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Varous experimental OpenCL commits

On 22 Dec, 2012, at 19:44 , Claudio André <claudioandre.br@...il.com> wrote:
> Em 22-12-2012 15:29, Sayantan Datta escreveu:
>>   void crypt_all(int count)
>>   {
>>         enqueue(Transfer);
>>         enqueue(RarInitKernel);
>>         for (i=0; i<HASH_LOOPS; i++)
>>         {
>>                 enqueue(RarLoopKernel);
>> +               clFinish();
>> +               opencl_process_event();
>>         }
>>         enqueue(RarFinalKernel);
>> 
>> 
>> Is it necessary to include clFinish() inside the loop to ensure proper functioning of opencl_process_event() ?
> 
> Yes. Otherwise the the result is not going to be the one expected.

Right. Normally, all functions in crypt_all() are non-blocking except the last clEnqueueReadBuffer(). So what happens without the clFinish() is that all of it (including that whole loop) will execute in a micro-second or so, and then we'll have a very long block in the clEnqueueReadBuffer() during which we can't process any events.

I feared those clFinish() calls would ruin performance but they do not. For a really fast format they would, but then we'd not need to use this anyway.

magnum
Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

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