aux/pb: more correctly check number of reclaims

the increment needs to happen before the comparison here

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

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13388>
(cherry picked from commit fe2674dd52)
This commit is contained in:
Mike Blumenkrantz 2021-10-15 16:01:52 -04:00 committed by Eric Engestrom
parent b7942e3134
commit 118131c071
2 changed files with 2 additions and 2 deletions

View file

@ -1183,7 +1183,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"
},

View file

@ -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;
}
}