summaryrefslogtreecommitdiffhomepage
path: root/notes
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-24 11:52:12 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-24 11:52:12 -0600
commit2b257338481007b88331ae445b26ff99bdbf8977 (patch)
treed5878c980bbeeffd02f17faf556854e599bd4251 /notes
parentd60ce596e6f4ecd62ada6be0916caea22c75e0a8 (diff)
downloadzash-docs/startup-probe.tar.gz
docs: humanize the markdown docsdocs/startup-probe
Plain sentences where the prose had decorative bold lead-ins, em dashes and one-line closers. Claims, numbers and commands are unchanged, except two corrections that the startup probe settled: README said the remaining z/OS gap was the price of the address mode, and DESIGN's open question on `a | b &` said the gain depended on the address mode. Both are the 64-bit C run-time, not the address mode.
Diffstat (limited to 'notes')
-rw-r--r--notes/investigation.md44
1 files changed, 22 insertions, 22 deletions
diff --git a/notes/investigation.md b/notes/investigation.md
index b12d5ea..06e47bd 100644
--- a/notes/investigation.md
+++ b/notes/investigation.md
@@ -1,8 +1,7 @@
# Investigations
-Questions worth more than a benchmark row, and the probes that answered
-them. `bench/README.md` holds the cost model and the benchmark numbers;
-this file holds the experiments behind them and the ones still open.
+Probes behind the numbers in `bench/README.md`, and what they left
+open.
Machine for everything here: the CBT z/OS system, z/OS 29.00, IBM Open
XL C/C++ 2.1 (clang 18.1.8), reached over SSH. Probes live in
@@ -10,11 +9,11 @@ XL C/C++ 2.1 (clang 18.1.8), reached over SSH. Probes live in
## 1. Is the 64-bit start-up cost the address mode or the C runtime?
-**Answer: the C runtime. A 64-bit address space costs nothing.**
+The C runtime. A 64-bit address space costs nothing.
A `-m64` program that does nothing pays about 28 ms per start; the same
source at `-m32` pays about 1 ms. The open question was which part of
-"64-bit" carries that cost — the address space, the loader, XPLINK, or
+"64-bit" carries that cost: the address space, the loader, XPLINK, or
Language Environment.
### Method: take the C runtime out
@@ -74,31 +73,32 @@ Three rounds, same numbers to 0.01 s each time.
### What it shows
-- `tiny64` is RMODE 64, loads above the bar and starts in 0.8 ms — the
- 64-bit address space and the loader that maps it are free.
+- `tiny64` is RMODE 64, loads above the bar and starts in 0.8 ms, so
+ the 64-bit address space and the loader that maps it are free.
- The 28 ms arrives with LE at 64 bits and only with it; at 31 bits LE
costs about 1 ms over bare metal.
-- XPLINK is not it either: `-m32` and `-m32n` differ by nothing.
+- XPLINK does not enter into it: `-m32` and `-m32n` start at the same
+ speed.
- So the fix for zash was to stop using the 64-bit C run-time, not to
stop using 64-bit addressing.
-This corrected two claims made earlier from the 32-bit rows alone —
-that the cost was "not C code", and that "only the 64-bit address space
-is slow". Both are wrong; the address space is free and the C run-time
-is the whole cost.
+Earlier notes drew two conclusions from the 32-bit rows alone: that the
+cost was "not C code", and that "only the 64-bit address space is
+slow". Neither holds. The address space is free and the C run-time is
+the whole cost.
### Not settled
-- **The 4 ms `fork()`.** No assembler `fork()` probe has been written,
- so the fork penalty is attributed to LE by inference (a fixed cost
- that appears only in 64-bit children), not by measurement. `BPX1FRK`
- is callable from HLASM at either AMODE; that is the next probe.
-- **Where inside LE the 28 ms goes.** `RPTOPTS`/`RPTSTG` show nothing
- tunable and `HEAP64`/`STACK64` move nothing, but splitting DLL
- load from enclave creation has not been tried.
-- **Why 31-bit LE costs 1 ms.** Assumed to be the same enclave work at
+- The 4 ms `fork()`. No assembler `fork()` probe has been written, so
+ the fork penalty is attributed to LE by inference (a fixed cost that
+ appears only in 64-bit children), not by measurement. `BPX1FRK` is
+ callable from HLASM at either AMODE; that is the next probe.
+- Where inside LE the 28 ms goes. `RPTOPTS`/`RPTSTG` show nothing
+ tunable and `HEAP64`/`STACK64` move nothing, but DLL load has not been
+ separated from enclave creation.
+- Why 31-bit LE costs 1 ms. Assumed to be the same enclave work at
smaller sizes; not measured separately.
Absolute figures drift between sessions and machines (the 32-bit C rows
-read 1.0–1.1 ms in an earlier run, 2.0 ms here); only comparisons made
-in one run are worth quoting.
+read 1.0 to 1.1 ms in an earlier run, 2.0 ms here); only comparisons
+made in one run are worth quoting.