Module: Mesa
Branch: main
Commit: 4ae4e4362cfdab91be81c48195674d354ef45602
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ae4e4362cfdab91be81c48195674d354ef45602

Author: Yiwei Zhang <[email protected]>
Date:   Wed Sep  7 17:41:39 2022 +0000

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18472>

---

 src/virtio/vulkan/vn_common.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/virtio/vulkan/vn_common.c b/src/virtio/vulkan/vn_common.c
index 4c0e45f721b..a7eff31ac0f 100644
--- a/src/virtio/vulkan/vn_common.c
+++ b/src/virtio/vulkan/vn_common.c
@@ -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);

Reply via email to