venus: Increase the base sleep of vn_relax
authorRenato Pereyra <renatopereyra@google.com>
Thu, 24 Mar 2022 23:12:43 +0000 (16:12 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 25 Mar 2022 00:16:39 +0000 (00:16 +0000)
Based on profiling, these 10us sleeps are behaving closer to ~60us
and causing higher-than-necessary CPU overhead. 120us seems like a
good balance between latency management and overhead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15565>

src/virtio/vulkan/vn_common.c

index b74b238..f9d639b 100644 (file)
@@ -86,7 +86,7 @@ vn_relax(uint32_t *iter, const char *reason)
     * keep doubling both sleep length and count.
     */
    const uint32_t busy_wait_order = 4;
-   const uint32_t base_sleep_us = 10;
+   const uint32_t base_sleep_us = 120;
    const uint32_t warn_order = 12;
    const uint32_t abort_order = 14;