Mesa (staging/21.3): aux/pb: more correctly check number of reclaims

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Oct 16 13:03:19 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 792205b6ca527667ebb389b5eaea3d9801b12144
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=792205b6ca527667ebb389b5eaea3d9801b12144

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Oct 15 16:01:52 2021 -0400

aux/pb: more correctly check number of reclaims

the increment needs to happen before the comparison here

Fixes: 3d6c8829f54 ("aux/pb: add a tolerance for reclaim failure")

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13388>
(cherry picked from commit fe2674dd52dd63e6fb4a69e037a7cb5266049e4a)

---

 .pick_status.json                          | 2 +-
 src/gallium/auxiliary/pipebuffer/pb_slab.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 0a914014553..f8c2929b9f5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -184,7 +184,7 @@
         "description": "aux/pb: more correctly check number of reclaims",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "3d6c8829f54e52ae39b91b18d49acccf47755320"
     },
diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.c b/src/gallium/auxiliary/pipebuffer/pb_slab.c
index 865ae92ee7f..83c1a597fe7 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_slab.c
@@ -89,7 +89,7 @@ pb_slabs_reclaim_locked(struct pb_slabs *slabs)
        * the driver should not walk the entire list, as this is likely to
        * result in zero reclaims if the first few entries fail to reclaim
        */
-      } else if (num_failed_reclaims++ > MAX_FAILED_RECLAIMS) {
+      } else if (++num_failed_reclaims >= MAX_FAILED_RECLAIMS) {
          break;
       }
    }



More information about the mesa-commit mailing list