|
NAMEmakepp_sandboxes -- How to partition a makepp buildDESCRIPTIOND: --do-build, --dont-build, --dont-read, --do-read, I: --in-sandbox, --inside-sandbox, O: --out-of-sandbox, S: --sandbox, --sandbox-warn, --sandbox-warning, V: --virtual-sandboxThere are a couple of reasons that you might want to partition the file tree for a makepp build:
Makepp has sandboxing facilities that address both concerns. Sandboxing OptionsThe following makepp options may be used to set the sandboxing properties of the subtree given by path and all of its files and potential files:
Each of these 3 properties applies to the entire subtree, including to files that do not yet exist. More specific paths override less specific paths. A specified path may be an individual file, even if the file does not yet exist. If a property is both set and reset on the exact same path, then the option that appears furthest to the right on the command line takes precedence. Sandboxing for AccelerationIf you want to prevent makepp from wasting time processing files that you know are already up-to-date (in particular, files that are generated by a build tool other than makepp), then --dont-build is the option for you.By far the most common case for such an optimization is that you know that everything not at or below the starting directory is already up-to-date. This can be communicated to makepp using "--dont-build /. --do-build .". Sandboxing for Concurrent ProcessesOne technique that can reduce build latency is to have multiple makepp processes working on the same tree. This is quite a bit more difficult to manage than using the -j option, but it can also be substantially more effective because:
The biggest risk with this approach is that the build can become nondeterministic if processes that might be concurrent interact with one another. This leads to build systems that produce incorrect results sporadically, and with no simple mechanism to determine why it happens. To address this risk, it is advisable to partition the tree among concurrent processes such that if any process accesses the filesystem improperly, then an error is deterministically raised immediately. Normally, this is accomplished by assigning to each concurrent process a "sandbox" in which it is allowed to write, where the sandboxes of no two concurrent processes may overlap. In addition, each process marks the sandboxes of any other possibly concurrent processes as "dont-read." If a process reads a file that another concurrent process is responsible for writing (and which therefore might not yet be written), then an error is raised immediately. Sandboxing for Sequential ProcessesWhen the build is partitioned for concurrent makepp processes, there is also usually a sequential relationship between various pairs of processes. For example, there may be a dozen concurrent compile processes, followed by a single link process that cannot begin until all of the compile processes have completed. Such sequential relationships must be enforced by whatever mechanism is orchestrating the various makepp processes (for example, the job queuing system).When processes have a known sequential relationship, there is normally no need to raise an error when they access the same part of the tree, because the result is nonetheless deterministic. However, it is generally beneficial to specify --dont-build options to the dependent process (the link process in our example) that notify it of the areas that have already been updated by the prerequisite processes (the compile jobs in our example). In this manner, we avoid most of the unnecessary work of null-building targets that were just updated. AUTHORAnders Johnson (anders@ieee.org)
Visit the GSP FreeBSD Man Page Interface. |