dsynth - Optimize pty use
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Aug 2019 19:08:08 +0000 (12:08 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Aug 2019 19:20:29 +0000 (12:20 -0700)
commit1d6e00cdb2312250869f93dc578cac6df09ef8bc
tree49bfb176517a54fbd0675d52193443706c9bf117
parent3699ee094c6e0c9ea7a280d480eb355bf65a1c32
dsynth - Optimize pty use

* Have the WORKER process allocate the pty once and use it in all
  phases, instead of allocating and closing a new pty for each phase.

* Make N copies of /bin, /lib, /usr/bin, and /libexec into the base
  directory and mount those in the chroots instead of the system
  directory, essentially unsharing these directories.  Each worker
  gets an independent copy.

  This should reduce contention and cache-line ping-ponging overhead
  on /bin/sh, libc, make, etc, significantly.

* Create the template conditionally whether 'pkg' has been built or
  not.
usr.bin/dsynth/build.c
usr.bin/dsynth/dsynth.h
usr.bin/dsynth/mount.c