venus: double the abort timeout

To avoid bumping abort timeout too much. This change also doubles the
busy wait cycles, which would further reduce unnecessary sleeps for
synchronous calls. Ultimately, after we fix the fencing and push all
roundtrip waiting to the renderer side as well as we fixing the abort
logic, we can live with busy wait alone here.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18472>
This commit is contained in:
Yiwei Zhang
2022-09-07 17:41:39 +00:00
committed by Marge Bot
parent 92ee2e6b64
commit 4ae4e4362c
+5 -5
View File
@@ -122,10 +122,10 @@ vn_relax(uint32_t *iter, const char *reason)
* base_sleep_us microseconds for the same number of times. After that,
* keep doubling both sleep length and count.
*/
const uint32_t busy_wait_order = 9;
const uint32_t busy_wait_order = 10;
const uint32_t base_sleep_us = vn_env.relax_base_sleep_us;
const uint32_t warn_order = 13;
const uint32_t abort_order = 15;
const uint32_t warn_order = 14;
const uint32_t abort_order = 16;
(*iter)++;
if (*iter < (1 << busy_wait_order)) {
@@ -133,8 +133,8 @@ vn_relax(uint32_t *iter, const char *reason)
return;
}
/* warn occasionally if we have slept at least 1.28ms for 4096 times (plus
* another 4095 shorter sleeps)
/* warn occasionally if we have slept at least 1.28ms for 8192 times (plus
* another 8191 shorter sleeps)
*/
if (unlikely(*iter % (1 << warn_order) == 0)) {
vn_log(NULL, "stuck in %s wait with iter at %d", reason, *iter);