OS-4940: dmake should cool its close(2) jets

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2015-11-10T03:50:04.000Z
Updated at:2015-11-13T00:46:51.000Z

People

Created by:Former user
Reported by:Former user
Assigned to:Former user

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2015-11-13T00:46:51.000Z)

Fix Versions

2015-11-26 Condie (Release Date: 2017-02-11)

Description

The dmake in illumos-extra excessively calls close(2) via:

              libc.so.1`__close+0x15
              dmake`__0FLredirect_ioPcTB+0x49
              dmake`__0FRrun_rule_commandsPcPPc+0x42
              dmake`__0FSdistribute_processPPcP6J_Property+0x268
              dmake`__0FQexecute_parallelP6J_Property6HBooleanTC+0x318
              dmake`__0FLrun_commandP6J_Property6HBoolean+0x354

The redirect_io function is using a naive loop around close instead of using closefrom.
It would be nice to change this over, if possible.

Comments

Comment by Former user
Created at 2015-11-11T18:17:02.000Z

While running a full build of illumos-joyent, dmake was sitting at around 2 million close(2) calls per second. (Running in my large-sized build zone)


Comment by Former user
Created at 2015-11-11T22:11:59.000Z

I ran a quick comparison of standard dmake vs one using closefrom to build 'uts':

old (using looped close):
real    10m55.744s
user    120m17.845s
sys     44m1.605s

new (with closefrom):
real    8m37.669s
user    96m15.669s
sys     17m0.267s

Comment by Former user
Created at 2015-11-13T00:46:45.000Z

illumos-joyent commit 76bac03 (branch master, by Patrick Mooney)

OS-4940 dmake should cool its close(2) jets
Reviewed by: Robert Mustacchi <rm@joyent.com>