Patch for port of jobserver to Windows

View: New views
7 Messages — Rating Filter:   Alert me  

Patch for port of jobserver to Windows

by Troy Runkel :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I’ve ported the GNU make jobserver to the Windows platform.  The port uses a Windows named semaphore to implement the jobserver.  I’d like to submit my diffs for consideration and inclusion in the main GNU make branch.  Please let me know if I missed anything in my changes.  Thanks.

 

--Troy Runkel

 



_______________________________________________
Make-w32 mailing list
Make-w32@...
http://lists.gnu.org/mailman/listinfo/make-w32

windows_jobserver.diff (21K) Download Attachment

Re: Patch for port of jobserver to Windows

by Greg Chicares-2 :: Rate this Message:

| View Threaded | Show Only this Message

On 2010-10-07 20:43Z, Troy Runkel wrote:
> I've ported the GNU make jobserver to the Windows platform.

Didn't the jobserver work on ms windows already? It seems to, for
an old binary that, IIRC, I built from unmodified 3.81 sources:

F:>make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32

# 'ping -n X+1' works like 'sleep X'

F:>type j.make
.PHONY: all
all: a b

.PHONY: a
a:
        ping -n 2 127.0.0.1 >NUL
        echo "a"

.PHONY: b
b:
        ping -n 2 127.0.0.1 >NUL
        echo "b"

# This test takes two seconds:

F:>make -f j.make
ping -n 2 127.0.0.1 >NUL
echo "a"
a
ping -n 2 127.0.0.1 >NUL
echo "b"
b

# This test takes one second on an eight-core system:

F:>make -j2 -f j.make
ping -n 2 127.0.0.1 >NUL
ping -n 2 127.0.0.1 >NUL
echo "a"
echo "b"
a
b

_______________________________________________
Make-w32 mailing list
Make-w32@...
http://lists.gnu.org/mailman/listinfo/make-w32

Re: Patch for port of jobserver to Windows

by Tom Honermann :: Rate this Message:

| View Threaded | Show Only this Message


On 10/7/2010 2:33 PM, Greg Chicares wrote:
> On 2010-10-07 20:43Z, Troy Runkel wrote:
>  
>> I've ported the GNU make jobserver to the Windows platform.
>>    
>
> Didn't the jobserver work on ms windows already? It seems to, for
> an old binary that, IIRC, I built from unmodified 3.81 sources:
>  
The job server is used when multiple make processes are involved so that
the total number
of jobs run by all make process does not exceed the specified job
count.  This is therefore
only relevant to recursive make invocations.  GNU make does currently
support multiple
jobs within a single make process (which your test case demonstrates).

Thanks Troy, I look forward to being able to use this functionality on
Windows!

Tom.

_______________________________________________
Make-w32 mailing list
Make-w32@...
http://lists.gnu.org/mailman/listinfo/make-w32

Re: Patch for port of jobserver to Windows

by Eli Zaretskii :: Rate this Message:

| View Threaded | Show Only this Message

> From: Troy Runkel <Troy.Runkel@...>
> Date: Thu, 7 Oct 2010 16:43:57 -0400
> Cc: Troy Runkel <Troy.Runkel@...>
>
> I've ported the GNU make jobserver to the Windows platform.  The port uses
> a Windows named semaphore to implement the jobserver.  I'd like to submit
> my diffs for consideration and inclusion in the main GNU make branch.
> Please let me know if I missed anything in my changes.  Thanks.

Thank you very much for this contribution.

Paul, it looks like the patch is large enough to require legal papers
from Troy, is that right?

Troy, I have 2 requests:

  . could you please post a short description of how this
    implementation of the job server works, and in particular how it
    makes sure all the make jobs together don't exceed the argument of
    the --jobs=N option?

  . could you please submit ChangeLog entries for each function you
    changed or added?

Thanks again for working on this.

_______________________________________________
Make-w32 mailing list
Make-w32@...
http://lists.gnu.org/mailman/listinfo/make-w32

Re: Patch for port of jobserver to Windows

by Eli Zaretskii :: Rate this Message:

| View Threaded | Show Only this Message

> Date: Thu, 07 Oct 2010 21:33:14 +0000
> From: Greg Chicares <gchicares@...>
>
> On 2010-10-07 20:43Z, Troy Runkel wrote:
> > I've ported the GNU make jobserver to the Windows platform.
>
> Didn't the jobserver work on ms windows already?

No.  Parallel builds with -jN are indeed supported on Windows since
Make 3.81, but not the jobserver.  The impact is that the sub-Make is
always invoked with -j1, unless you explicitly override that in the
sub-Make invocation command line.

> F:>make -j2 -f j.make
> ping -n 2 127.0.0.1 >NUL
> ping -n 2 127.0.0.1 >NUL
> echo "a"
> echo "b"
> a
> b

You have here only one level of recursion.  To see the difference, you
need more than one.

_______________________________________________
Make-w32 mailing list
Make-w32@...
http://lists.gnu.org/mailman/listinfo/make-w32

Re: Patch for port of jobserver to Windows

by Paul Smith-20 :: Rate this Message:

| View Threaded | Show Only this Message

On Fri, 2010-10-08 at 09:35 +0200, Eli Zaretskii wrote:
> Paul, it looks like the patch is large enough to require legal papers
> from Troy, is that right?

Yes, I'd definitely agree.  I see a couple of other assignments from
people who work for Mathworks Inc. so hopefully there's some precedent
or process there.  Troy, let me know if you want some names.


Cheers!

--
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@...>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Make-w32 mailing list
Make-w32@...
http://lists.gnu.org/mailman/listinfo/make-w32

Re: Patch for port of jobserver to Windows

by Tom Honermann :: Rate this Message:

| View Threaded | Show Only this Message

On 10/8/2010 6:02 AM, Paul Smith wrote:
> On Fri, 2010-10-08 at 09:35 +0200, Eli Zaretskii wrote:
>> Paul, it looks like the patch is large enough to require legal papers
>> from Troy, is that right?
> Yes, I'd definitely agree.  I see a couple of other assignments from
> people who work for Mathworks Inc. so hopefully there's some precedent
> or process there.  Troy, let me know if you want some names.
>
> Cheers!
>
I would love to make use of this patch.  Any chance the copyright
assignments have
been or are being worked out?

Tom.

_______________________________________________
Make-w32 mailing list
Make-w32@...
http://lists.gnu.org/mailman/listinfo/make-w32