[M3devel] [M3commit] CVS Update: cm3

Mika Nystrom mika at async.caltech.edu
Tue Feb 15 02:56:57 CET 2011


Jay K writes:
>--_0b68c717-b1e6-43b7-b824-79e05d0f3a43_
>Content-Type: text/plain; charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
>
>You might want to throttle the number of outstanding promises.

Yeah that's in a different module.  QMachine doesn't control what's
actually done with the promises (how many in parallel are run etc).

The idea is:
   1. client of QMachine sets "doRecord" flag
   2. QMachine writes all the back-end promises to a sequence.
   3. client clears doRecord flag

After that it's up to the client to launch the promises as it desires,
one at a time or 100 at a time, as the case may be.

I'm looking at how to specify this now.  You're right it's annoying there's
no automatic way of doing it.  Default will be serial as always, the
impatient can specify a flag or a setting somewhere.  I'm leaning
towards making it both a config variable and a command-line option...

The code is kind of ugly but it sped up my compiles so much I immediately
felt I couldn't live without it....I'm taking care that it won't change
the behavior for anyone else (unless they ask for it).

    Mika

>If only Posix provided good functions for e.g. finding the number of proces=
>sors.
>Or if NT or Posix made it easy to discover the number of spindles backing a=
> path=2C
>or to easily measure system utilization and backing down when it gets near =
>100%.
>You know=2C an idle machine should be maxed out=2C but no more.
>A machine with an interactive user should reserve CPU/memory/I/O for forgro=
>und activity..
>I don't I've ever seen this stuff done well though.
>=20
> - Jay
>
>=20
>> Date: Tue=2C 15 Feb 2011 02:30:18 +0000
>> To: m3commit at elegosoft.com
>> From: mika at elego.de
>> Subject: [M3commit] CVS Update: cm3
>>=20
>> CVSROOT: /usr/cvs
>> Changes by: mika at birch. 11/02/15 02:30:18
>>=20
>> Modified files:
>> cm3/m3-sys/m3quake/src/: QMachine.i3 QMachine.m3 m3makefile=20
>> Added files:
>> cm3/m3-sys/m3quake/src/: QPromise.i3 QPromise.m3=20
>>=20
>> Log message:
>> Add support for the QMachine to be able to record (certain) Process.Creat=
>es as "promises" rather than executing them on the fly.
>>=20
>> The purpose of this modification is to allow parallelization of the CM3 c=
>ompiler. The vast majority of the runtime of the compilation of a typical M=
>odula-3 program is spent in the part "promised" here (when using the GCC ba=
>ckend).
>>=20
> 		 	   		  =
>
>--_0b68c717-b1e6-43b7-b824-79e05d0f3a43_
>Content-Type: text/html; charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
><html>
><head>
><style><!--
>.hmmessage P
>{
>margin:0px=3B
>padding:0px
>}
>body.hmmessage
>{
>font-size: 10pt=3B
>font-family:Tahoma
>}
>--></style>
></head>
><body class=3D'hmmessage'>
>You might want to throttle the number of outstanding promises.<BR>
>If only Posix provided good functions for e.g. finding the number of proces=
>sors.<BR>
>Or if&nbsp=3BNT or Posix made it easy to discover the number of spindles ba=
>cking a path=2C<BR>
>or to easily measure system utilization and backing down when it&nbsp=3Bget=
>s near 100%.<BR>
>You know=2C an idle machine should be maxed out=2C but no more.<BR>
>A machine with an interactive user should reserve&nbsp=3BCPU/memory/I/O for=
> forground activity..<BR>
>I don't I've ever seen this stuff done well though.<BR>
>&nbsp=3B<BR>
>&nbsp=3B- Jay<BR><BR>&nbsp=3B<BR>
>&gt=3B Date: Tue=2C 15 Feb 2011 02:30:18 +0000<BR>&gt=3B To: m3commit at elego=
>soft.com<BR>&gt=3B From: mika at elego.de<BR>&gt=3B Subject: [M3commit] CVS Up=
>date: cm3<BR>&gt=3B <BR>&gt=3B CVSROOT: /usr/cvs<BR>&gt=3B Changes by: mika=
>@birch. 11/02/15 02:30:18<BR>&gt=3B <BR>&gt=3B Modified files:<BR>&gt=3B cm=
>3/m3-sys/m3quake/src/: QMachine.i3 QMachine.m3 m3makefile <BR>&gt=3B Added =
>files:<BR>&gt=3B cm3/m3-sys/m3quake/src/: QPromise.i3 QPromise.m3 <BR>&gt=
>=3B <BR>&gt=3B Log message:<BR>&gt=3B Add support for the QMachine to be ab=
>le to record (certain) Process.Creates as "promises" rather than executing =
>them on the fly.<BR>&gt=3B <BR>&gt=3B The purpose of this modification is t=
>o allow parallelization of the CM3 compiler. The vast majority of the runti=
>me of the compilation of a typical Modula-3 program is spent in the part "p=
>romised" here (when using the GCC backend).<BR>&gt=3B <BR> 		 
>	   		  </bod=
>y>
></html>=
>
>--_0b68c717-b1e6-43b7-b824-79e05d0f3a43_--



More information about the M3devel mailing list