mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 16:50:13 +01:00
venus: use more relaxed profile for TLS ring seqno wait
Excessive polling for TLS ring synchronous cmds is a waste of cpu cycles. Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28706>
This commit is contained in:
parent
7f246bca04
commit
abc327a39a
3 changed files with 8 additions and 2 deletions
|
|
@ -167,6 +167,8 @@ vn_relax_reason_string(enum vn_relax_reason reason)
|
|||
switch (reason) {
|
||||
case VN_RELAX_REASON_RING_SEQNO:
|
||||
return "ring seqno";
|
||||
case VN_RELAX_REASON_TLS_RING_SEQNO:
|
||||
return "tls ring seqno";
|
||||
case VN_RELAX_REASON_RING_SPACE:
|
||||
return "ring space";
|
||||
case VN_RELAX_REASON_FENCE:
|
||||
|
|
@ -204,6 +206,7 @@ vn_relax_get_profile(enum vn_relax_reason reason)
|
|||
.warn_order = 12,
|
||||
.abort_order = 16,
|
||||
};
|
||||
case VN_RELAX_REASON_TLS_RING_SEQNO:
|
||||
case VN_RELAX_REASON_RING_SPACE:
|
||||
case VN_RELAX_REASON_FENCE:
|
||||
case VN_RELAX_REASON_SEMAPHORE:
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ struct vn_watchdog {
|
|||
|
||||
enum vn_relax_reason {
|
||||
VN_RELAX_REASON_RING_SEQNO,
|
||||
VN_RELAX_REASON_TLS_RING_SEQNO,
|
||||
VN_RELAX_REASON_RING_SPACE,
|
||||
VN_RELAX_REASON_FENCE,
|
||||
VN_RELAX_REASON_SEMAPHORE,
|
||||
|
|
|
|||
|
|
@ -175,8 +175,10 @@ vn_ring_wait_seqno(struct vn_ring *ring, uint32_t seqno)
|
|||
/* A renderer wait incurs several hops and the renderer might poll
|
||||
* repeatedly anyway. Let's just poll here.
|
||||
*/
|
||||
struct vn_relax_state relax_state =
|
||||
vn_relax_init(ring->instance, VN_RELAX_REASON_RING_SEQNO);
|
||||
const enum vn_relax_reason reason = ring == ring->instance->ring.ring
|
||||
? VN_RELAX_REASON_RING_SEQNO
|
||||
: VN_RELAX_REASON_TLS_RING_SEQNO;
|
||||
struct vn_relax_state relax_state = vn_relax_init(ring->instance, reason);
|
||||
do {
|
||||
if (vn_ring_get_seqno_status(ring, seqno)) {
|
||||
vn_relax_fini(&relax_state);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue