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: Mon, 25 May 2026 19:06:38 +1000 Message-ID: In-Reply-To: <20260522092600.32818-5-francois.dugast@intel.com> References: <20260522092600.32818-1-francois.dugast@intel.com> <20260522092600.32818-5-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 **Correctness: The scoreboard maintenance looks correct.** The increment/decrement sites are: 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) 4. `__gpu_buddy_free()` coalescing loop =E2=80=94 decrement for buddy being= removed from tree 5. `__force_merge()` =E2=80=94 decrement for block being removed from tree 6. `__gpu_buddy_undo_splits()` =E2=80=94 decrement for block being removed = from tree These cover all the places where `rbtree_remove` is called on a free block = (decrements) and where `rbtree_insert` is called on a free block (increment= s, via `mark_free`). **Initialization and cleanup look correct** =E2=80=94 `kcalloc` zeroes the = array, `kfree` in both the init error path and `fini`. **One minor note on the print threshold change:** ```c - if (free < SZ_1M) + if (free < SZ_1M) ``` In this patch the threshold is still based on `free` (the total free bytes)= . This gets changed to `block_size` in patch 5. That's fine =E2=80=94 incre= mental development. No issues. --- Generated by Claude Code Patch Reviewer