Runtime README: the host-seen event value is stated in the events contract
The sentence saying that an event's value the host sees, where a GPU signal raised it, is one a host wait with a timeout of 0 confirmed states how events behave; it is not a gap. It moves from "Known gaps" (the timestamp-pool bullet, restored to its text before the fix) to the `Event` and `SharedEvent` bullet of "Queues, command buffers and events", in the present tense. No code changes. The record of the fix's cost (58158f96a9, with the doc commit4ab995b621on it): the harness's two_queues row (`harness --runtime new --only two_queues`), before =d50eeb3522, after =4ab995b621, 5 pairs alternated in one exclusive job per card, the arm order swapped each pair. Times in us (b_done_p50 in ms: B committed to completed in the signalling part). spr is an arm's max / min - 1. RTX 2080, job m3-max-76839: every event key within 1%, base spreads at most 4.0%. run wait_p50 wait_p90 a_gap_p50 a_gap_p90 a_per_cb b_done_p50 before 1 19.840 20.192 41.376 42.336 20250.718 161.700 after 1 19.840 20.352 41.600 42.528 20263.368 161.800 after 2 19.872 20.128 41.312 42.176 20255.721 161.800 before 2 19.808 20.448 41.350 42.432 20251.343 161.800 before 3 19.872 20.480 41.120 42.144 20255.964 161.800 after 3 19.904 21.472 41.472 44.416 20255.081 161.800 after 4 20.000 20.416 41.344 43.040 20256.101 161.800 before 4 19.904 20.896 41.333 42.976 20258.708 161.800 before 5 19.904 20.992 41.440 43.776 20254.411 161.800 after 5 19.904 21.088 41.472 42.469 20252.510 161.800 before p50 19.872 20.480 41.350 42.432 20254.411 161.800 before spr 0.5% 4.0% 0.8% 3.9% 0.0% 0.1% after p50 19.904 20.416 41.472 42.528 20255.721 161.800 after spr 0.8% 6.7% 0.7% 5.3% 0.1% 0.0% after/before 1.002 0.997 1.003 1.002 1.000 1.000 Iris Xe (RPL-P), job m3-max-76844: every event key within 1%, base spreads at most 1.7%. run wait_p50 wait_p90 a_gap_p50 a_gap_p90 a_per_cb b_done_p50 before 1 9.012 9.167 38.803 46.503 22598.215 180.500 after 1 9.063 9.324 38.854 46.564 22597.641 180.500 after 2 9.220 9.636 38.959 46.826 22609.295 180.500 before 2 9.064 9.271 38.855 46.663 22597.349 180.500 before 3 9.115 9.272 38.855 46.353 22610.056 180.500 after 3 9.115 9.272 38.856 46.625 22642.170 180.600 after 4 9.114 9.271 38.803 46.498 22597.597 180.400 before 4 9.115 9.271 38.855 46.410 22625.471 180.500 before 5 9.167 9.323 38.804 46.567 22606.507 180.400 after 5 9.115 9.272 38.855 46.574 22618.163 180.500 before p50 9.115 9.271 38.855 46.503 22606.507 180.500 before spr 1.7% 1.7% 0.1% 0.7% 0.1% 0.1% after p50 9.115 9.272 38.855 46.574 22609.295 180.500 after spr 1.7% 3.9% 0.4% 0.7% 0.2% 0.1% after/before 1.000 1.000 1.000 1.002 1.000 1.000 RX 7900 XTX (RADV), job m3-max-76837: every event key within 1%, base spreads at most 4.5%. run wait_p50 wait_p90 a_gap_p50 a_gap_p90 a_per_cb b_done_p50 before 1 23.480 23.720 664.250 690.220 20664.500 165.100 after 1 23.560 23.800 665.520 685.240 20546.559 164.200 after 2 23.520 23.680 665.530 735.111 20645.568 165.000 before 2 23.520 23.680 663.780 697.990 20594.544 164.700 before 3 23.440 23.680 654.693 677.460 20495.322 164.300 after 3 23.480 23.680 665.810 670.200 20624.176 164.800 after 4 23.560 23.720 665.800 681.720 20659.588 165.100 before 4 23.560 23.720 661.400 688.170 20614.650 164.500 before 5 23.600 23.720 661.600 668.007 20625.205 164.700 after 5 23.520 23.720 665.078 697.190 20629.603 164.800 before p50 23.520 23.720 661.600 688.170 20614.650 164.700 before spr 0.7% 0.2% 1.5% 4.5% 0.8% 0.5% after p50 23.520 23.720 665.530 685.240 20629.603 164.800 after spr 0.3% 0.5% 0.1% 9.7% 0.6% 0.5% after/before 1.000 1.000 1.006 0.996 1.001 1.001 RTX 5080 Laptop, job m3-max-76834: VOID, its base arm spreads above 10% (41.4% on wait_p50, 41.8% on wait_a_gap_p50); its runs fall in two groups (8.3 to 9.1 us and 10.2 to 12.0 us on wait_p50) in both arms. run wait_p50 wait_p90 a_gap_p50 a_gap_p90 a_per_cb b_done_p50 before 1 12.032 12.768 23.872 26.016 20877.065 160.800 after 1 10.176 12.448 22.576 25.984 21461.131 163.600 after 2 11.264 12.768 22.719 26.464 21465.165 163.700 before 2 8.960 12.512 18.272 25.984 21513.619 163.900 before 3 8.672 12.352 17.984 25.952 21537.336 163.900 after 3 11.232 12.416 22.130 25.184 21585.253 164.100 after 4 8.320 12.256 16.544 24.736 21603.339 164.000 before 4 8.512 12.480 16.832 24.736 21658.572 165.000 before 5 8.672 12.448 17.568 26.016 21687.321 165.000 after 5 9.088 12.640 19.136 26.272 21728.232 164.900 before p50 8.672 12.480 17.984 25.984 21537.336 163.900 before spr 41.4% 3.4% 41.8% 5.2% 3.9% 2.6% after p50 10.176 12.448 22.130 25.984 21585.253 164.000 after spr 35.4% 4.2% 37.3% 7.0% 1.2% 0.8% after/before 1.173 0.997 1.231 1.000 1.002 1.001 Columns: wait_p50 and wait_p90 are B's GPU start after the signaller's GPU end; a_gap_p50 and a_gap_p90 are the harness's wait_a_gap keys (A's GPU idle before each of its command buffers); a_per_cb is wait_a_per_cb. At4ab995b621: lint job m3-max-76840 green (fmt, signatures, api_surface, clippy in all three configurations, Rustdoc -D warnings); the runtime suite on lavapipe under the validation layer, jobs m3-max-76841 (394 passed) and m3-max-76842 (444 passed), none failed. This commit changes the README alone; its check is fmt and Rustdoc -D warnings, run on it once made.
This commit is contained in:
1 parent
4ab995b621
commit
1f7b797e2e
1 file changed
+6
-5
@@ -2432,7 +2432,11 @@ made, with no lock, and never rewritten for layouts.
|
||||
the semaphore only rises and never races a host set.
|
||||
`signaled_value` is the higher of the semaphore and the floor. `notify_listener` runs its
|
||||
listener on the completion thread when the value is reached, at a signal in the middle of a
|
||||
command buffer as well as at its end; `wait_until_signaled_value` wakes then too.
|
||||
command buffer as well as at its end; `wait_until_signaled_value` wakes then too. A value the
|
||||
host sees that a GPU signal raised (`signaled_value`, `wait_until_signaled_value`, a
|
||||
listener's value) is one a host wait with a timeout of 0 (`vkWaitSemaphores`) confirmed after
|
||||
the semaphore's counter read found it, never the counter read alone; a read at or below the
|
||||
value last confirmed asks for no wait.
|
||||
- `Fence` is `MTLFence`, and `update_fence` and `wait_for_fence` on compute and blit encoders are
|
||||
`updateFence:` and `waitForFence:`, on one queue or across queues. They record nothing: every
|
||||
queue's command buffers go to the device's one `VkQueue`, and each encoder's writes reach every
|
||||
@@ -2629,10 +2633,7 @@ while the driver's exit handler waited on a lock, with every runtime thread alre
|
||||
retires only once a host wait has seen its submission's progress value: with one value pending
|
||||
the completion thread asks only that wait, and with more, where the semaphore's counter read
|
||||
runs ahead of the wait, `Metrics::waits_behind_counter` counts the round, and nothing retires
|
||||
until the wait agrees. An event's value the host sees that a GPU signal raised
|
||||
(`SharedEvent::signaled_value`, `wait_until_signaled_value`, a listener's value) is likewise
|
||||
one a wait with a timeout of 0 confirmed, after the counter read found it; a read at or below
|
||||
the value last confirmed asks for no wait. The device tests, the harness and the replay player
|
||||
until the wait agrees. The device tests, the harness and the replay player
|
||||
report both counts. Vulkan states no most queries a pool may hold or most pools a device may
|
||||
make; the runtime's 4,096 a pool is the smallest met: Mesa's Apple-GPU driver makes each pool a
|
||||
Metal counter heap, of at most 4,096 entries and at most 32 live in a process, so there at most
|
||||
|
||||
Reference in new issue
Block a user