From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu/buddy: Track per-order free blocks with a scoreboard Date: Tue, 05 May 2026 08:19:37 +1000 Message-ID: In-Reply-To: <20260504135343.1797869-2-francois.dugast@intel.com> References: <20260504135343.1797869-1-francois.dugast@intel.com> <20260504135343.1797869-2-francois.dugast@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Verdict: Looks good overall.** The free_scoreboard is maintained at all the right transition points: 1. `mark_free()` =E2=80=94 increment (block enters free state) 2. `mark_allocated()` =E2=80=94 decrement (block leaves free state) 3. `mark_split()` =E2=80=94 decrement (block leaves free state to become sp= lit) 4. `__gpu_buddy_free()` coalescing loop =E2=80=94 decrement for `buddy` bei= ng removed from rbtree before `gpu_block_free()` 5. `__force_merge()` =E2=80=94 decrement for `block` being removed from rbt= ree before merging All five sites are correct and pair up properly. **Init/fini:** The allocation and error-handling are correct. `free_scorebo= ard` is allocated with `kcalloc` (zero-initialized), freed in `gpu_buddy_fi= ni()`, and the error path in `gpu_buddy_init()` has a proper `out_free_scor= eboard` label. **Minor nit =E2=80=94 label naming foreshadowing:** The error label is name= d `out_free_scoreboard`, which works for this patch. However, patch 2 renam= es it to `out_free_free_scoreboard` to disambiguate from `out_free_scoreboa= rd` (which becomes the used_scoreboard label). This creates a somewhat awkw= ard label name. Consider using something like `out_free_sb` / `out_used_sb`= instead, or `out_scoreboard` / `out_used_scoreboard`. But this is cosmetic. **No issues found.** --- --- Generated by Claude Code Patch Reviewer