lkml.org 
[lkml]   [2011]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] coccicheck: add parallel execution
On 07/12/2011 09:42 PM, Joe Perches wrote:
> On Tue, 2011-07-12 at 20:26 -0500, Greg Dietsche wrote:
>
>> For example to process 6 SmPL patches at the same time:
>> make coccicheck PARALLEL=6
>> Results are held in /tmp until the scripts finish. By doing this the
>> script is able to collate the results from each SmPL patch instead of
>> interleaving them in the output.
>>
> You might try adding support for gnu parallel instead.
> http://www.gnu.org/software/parallel/
>
>
That is a very interesting and useful tool :) I'd never heard of it
before. The man page scares me a little bit - lots of options are marked
as "alpha testing," but the ones i tried seemed to work fine. Anyway,
without any modifications to Coccinelle, it is possible to do this:

ls scripts/coccinelle/*/*.cocci | parallel -j+0 make coccicheck COCCI={}
MODE=patch
it seems to behave mostly like my patch, but doesn't cleanup quite as
well if you decide to kill it with ctrl-c (it leaves instances of spatch
running). On the upside, it is up to 3 seconds faster than my patch
(because my patch waits 3 seconds before checking on the number of jobs
that are running).

Greg


\
 
 \ /
  Last update: 2011-07-14 04:17    [from the cache]
©2003-2011 Jasper Spaans