Skip to content

jitv2: stop the idle compile worker polling every 200us - #800

Open
jamesbraid wants to merge 1 commit into
mainfrom
perf/jitv2-idle-worker
Open

jamesbraid wants to merge 1 commit into
mainfrom
perf/jitv2-idle-worker

Conversation

@jamesbraid

Copy link
Copy Markdown
Collaborator

handle_request_deferred counts a compile whose range is not sealed yet
in pending. When a later compile's seal attempt released that range,
publish_all published it but pending stayed up, and the idle sweeps
only subtract what they seal themselves. With nothing left in the seal
queue pending never reached 0, so the worker kept the 200us publish
backstop instead of the 20ms idle one.

Subtract the entries a finalize releases other than the compile's own.

At the Indy PROM menu the worker sat at pending=63 with an empty seal
queue. Voluntary context switches of the compile thread over 10 s, on a
loaded host, built-in PROM, headless: Indy 3770/s -> 49/s, O2 3763/s ->
49/s. The thread made 2 clock_gettime calls per wakeup.

Fixes: 6d70615 ("multi threaded jit compiler")

handle_request_deferred counts a compile whose range is not sealed yet
in `pending`. When a later compile's seal attempt released that range,
publish_all published it but `pending` stayed up, and the idle sweeps
only subtract what they seal themselves. With nothing left in the seal
queue `pending` never reached 0, so the worker kept the 200us publish
backstop instead of the 20ms idle one.

Subtract the entries a finalize releases other than the compile's own.

At the Indy PROM menu the worker sat at pending=63 with an empty seal
queue. Voluntary context switches of the compile thread over 10 s, on a
loaded host, built-in PROM, headless: Indy 3770/s -> 49/s, O2 3763/s ->
49/s. The thread made 2 clock_gettime calls per wakeup.

Fixes: 6d70615 ("multi threaded jit compiler")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant