You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bench: the byte limits of the perf gate check nothing in CI #50
The perf gate fails a change whose binary passes more bytes to read(2)
or write(2) than the base, by more than 1% and 4 KiB (cf. 1, 2).
measure takes those bytes from /proc/PID/io of the child, which it
reads after the child exited and before it reaps it (cf. 3).
On the GitHub runners all of it comes out 0. The Performance job of the
push of 49e4987 to main reports 0.00 MB written and read for every
workload (cf. 4), and so does the one of #32. In the compare.tsv the
job uploads, wchar, rchar, syscw and syscr are 0 in all 198 timed runs,
while strace counts 314 pwrite64() and 260 pread64() calls for
assemble/esp in the same job. So measure doesn't get the file at all.
read_proc_io() takes a failed read for an empty file (cf. 5), and
compare() takes a base of 0 for no change (cf. 6). IOW, the limit
can't fail in CI, and the job doesn't say that it checked nothing.
Why the read fails, found by reading the kernel and not tried on a
runner: the runner image runs 7.0.0-1020-azure (cf. 7). Before v7.2,
task_dump_owner() gives the proc files of a task without an mm to root
(cf. 8), and a zombie has dropped its mm. io is 0400 (cf. 9), so an
unprivileged measure can't open the file of its zombie child. Since
v7.2 the file keeps its owner: 6b1c66c9cca9 ("exec_state: relocate
dumpable information") moved the dumpable state from the mm to the
task's exec_state, which outlives exit_mm().
So let's:
Make measure fail, or report the counters as missing, when it can't
read them, and have compare.py show a metric without data as such
instead of +0.0%.
Take the counters from measure's own /proc/self/io, read right
before and right after it reaps the child. wait_task_zombie() adds
the counters of a reaped child to those of its parent (cf. 10),
which bench/run.sh already relies on for the children of mcopy
(cf. 11), and a process can always read its own file. The
difference is the child's, apart from what measure's own first read
of the file adds.
Activity