Project

General

Profile

Bug #6455

dmake should cool its close(2) jets

Added by Patrick Mooney about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
tools - gate/build tools
Start date:
2015-11-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

I was doing some dtracing while waiting for a build to finish and discovered that dmake makes an excessive number of close(2) calls. It's a case of "call close in a loop until maxfd" logic during io redirection when spawning a job. When replaced with closefrom(), I saved almost 40% (77 mins cut down to 47 mins) on a full nightly run of SmartOS.

Additional details here: https://smartos.org/bugview/OS-4940

#1

Updated by Robert Mustacchi about 5 years ago

  • Subject changed from dmake should use closefrom() to dmake should cool its close(2) jets
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)
#2

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed

git commit da2c0e64794ff584dca660fcc94a444dcc0d6c0b

commit  da2c0e64794ff584dca660fcc94a444dcc0d6c0b
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2015-11-14T16:47:05.000Z

    6455 dmake should cool its close(2) jets
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Adam Števko <adam.stevko@gmail.com>
    Reviewed by: Albert Lee <trisk@omniti.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF