From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-patch1-20260504135343.1797869-2-francois.dugast@intel.com> (raw)
In-Reply-To: <20260504135343.1797869-2-francois.dugast@intel.com>
Patch Review
**Verdict: Looks good overall.**
The free_scoreboard is maintained at all the right transition points:
1. `mark_free()` — increment (block enters free state)
2. `mark_allocated()` — decrement (block leaves free state)
3. `mark_split()` — decrement (block leaves free state to become split)
4. `__gpu_buddy_free()` coalescing loop — decrement for `buddy` being removed from rbtree before `gpu_block_free()`
5. `__force_merge()` — decrement for `block` being removed from rbtree before merging
All five sites are correct and pair up properly.
**Init/fini:** The allocation and error-handling are correct. `free_scoreboard` is allocated with `kcalloc` (zero-initialized), freed in `gpu_buddy_fini()`, and the error path in `gpu_buddy_init()` has a proper `out_free_scoreboard` label.
**Minor nit — label naming foreshadowing:** The error label is named `out_free_scoreboard`, which works for this patch. However, patch 2 renames it to `out_free_free_scoreboard` to disambiguate from `out_free_scoreboard` (which becomes the used_scoreboard label). This creates a somewhat awkward 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
next prev parent reply other threads:[~2026-05-04 22:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 13:52 [PATCH 0/2] gpu/buddy: Per-order free and used block scoreboards Francois Dugast
2026-05-04 13:52 ` [PATCH 1/2] gpu/buddy: Track per-order free blocks with a scoreboard Francois Dugast
2026-05-04 22:19 ` Claude Code Review Bot [this message]
2026-05-04 13:52 ` [PATCH 2/2] gpu/buddy: Track per-order used " Francois Dugast
2026-05-04 22:19 ` Claude review: " Claude Code Review Bot
2026-05-04 22:19 ` Claude review: gpu/buddy: Per-order free and used block scoreboards Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-20260504135343.1797869-2-francois.dugast@intel.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox