[M3devel] nt386gnu threads?

Olaf Wagner wagner at elegosoft.com
Thu Feb 28 14:28:55 CET 2008


Quoting Jay <jayk123 at hotmail.com>:

> Done.On birch, time sh -c "./do-pkg.sh realclean libm3 &&   
> ./do-pkg.sh buildship libm3"
> seems go from about 35 seconds to about 15 seconds.Let me know what   
> improvements people see?
> OMIT_GCC=yes do-cm3-std probably is the best test.alarmthreads   
> platforms (PPC_LINUX), no change (still rebuilding actually).

That's great. I'll let you know this evening how it works for me.

> NT386GNU still seems just as slow.

IIRC, process creation (fork) was always really slow in Cygwin.
You cannot expect to be better than the underlying platform :-/

> At some point I will try batching up the cm3cg and/or as calls.
> Maybe via a wrapper on Windows only that then just makes n Win32   
> CreateProcess calls instead of n Cygwin vforks.
> It might be nice to have Quake callouts for before_first_compile,   
> after_last_compile, before_first_assemble, after_last_assemble,   
> though this brings up that there should perhaps be   
> begin_package/end_package, for cm3 to become a multi-package   
> builder..and then, really, multi-threaded, so there'd have to be   
> maybe extra state variables passed around, maybe. (and then Cygwin's  
>  waitpid not being threadsafe breaks this...)

What we really should do to speed things up on modern multi-core
processors is to implement parallel compilation (both front-end
and back-end) of sources. This should be possible now that we
have native thread support in M3. It will probably need some
design changes though; I haven't looked into it, though I often
thought this was a missing feature.

Olaf

> (For prototyping, before_first compile is implied,   
> after_last_compile/assemble is implied by make_lib/skip_lib/link, so  
>  any queuing up could be flushed at that point. Goal here being not   
> to reduce process creates, but cygwin processes created from cygwin   
> processes. oh, and I just realized, cm3cg should probably mark all   
> data as "no copy" when targeting Cygwin. That might help a bunch.)
>  - Jay
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list