public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: mm: Add helper to convert HMM pfn to migrate pfn
Date: Mon, 25 May 2026 16:46:27 +1000	[thread overview]
Message-ID: <review-patch2-20260525050830.100254-3-mpenttil@redhat.com> (raw)
In-Reply-To: <20260525050830.100254-3-mpenttil@redhat.com>

Patch Review

**Minor issues.**

1. **New flags consume bits from the order field.** The `HMM_PFN_ORDER_SHIFT` moves from `BITS_PER_LONG - 11` to `BITS_PER_LONG - 13`, reducing the available order bits from 5 to 5 (no change, since bits 7 and 8 are now flags). However, the two new flags (`HMM_PFN_MIGRATE` at bit 7, `HMM_PFN_COMPOUND` at bit 8) sit between the existing flag bits and the order field. This is fine for correctness but the comment block should document the full bit layout.

2. **`HMM_PFN_COMPOUND` documentation typo:**
```
+ * HMM_PFN_COMPOUND   - The entry is represents a > 0 order page
```
Should be "The entry represents a > 0 order page" (remove "is").

3. **`migrate_hmm_range_setup()` is `EXPORT_SYMBOL` (not `_GPL`)**. Given that this is a core MM function operating on migrate_vma internals, `EXPORT_SYMBOL_GPL` would be more appropriate to match the convention of `migrate_vma_setup` and friends which are `EXPORT_SYMBOL`.

4. **`migrate_vma_unmap()` call from `migrate_hmm_range_setup()`**: This works because both are in `migrate_device.c`, but `migrate_vma_unmap()` is static. If `migrate_hmm_range_setup()` were ever moved, this would break. Worth noting but not blocking.

5. **`range->migrate` uses spaces for alignment** instead of tabs in the struct definition:
```
+	struct migrate_vma      *migrate;
```
Should use a tab for consistency with the other fields.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-25  6:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25  5:08 [PATCH v11 0/5] Migrate on fault for device pages mpenttil
2026-05-25  5:08 ` [PATCH v11 1/5] mm/Kconfig: changes for migrate " mpenttil
2026-05-25  6:46   ` Claude review: " Claude Code Review Bot
2026-05-25  5:08 ` [PATCH v11 2/5] mm: Add helper to convert HMM pfn to migrate pfn mpenttil
2026-05-25  6:46   ` Claude Code Review Bot [this message]
2026-05-25  5:08 ` [PATCH v11 3/5] mm/hmm: do the plumbing for HMM to participate in migration mpenttil
2026-05-25  6:46   ` Claude review: " Claude Code Review Bot
2026-05-25  5:08 ` [PATCH v11 4/5] mm: setup device page migration in HMM pagewalk mpenttil
2026-05-25  6:46   ` Claude review: " Claude Code Review Bot
2026-05-25  5:08 ` [PATCH v11 5/5] lib/test_hmm: add a new testcase for the migrate on fault mpenttil
2026-05-25  6:46   ` Claude review: " Claude Code Review Bot
2026-05-25  6:46 ` Claude review: Migrate on fault for device pages Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-25  8:45 [PATCH v12 0/5] " mpenttil
2026-05-25  8:45 ` [PATCH v12 2/5] mm: Add helper to convert HMM pfn to migrate pfn mpenttil
2026-05-25 21:29   ` Claude review: " 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-patch2-20260525050830.100254-3-mpenttil@redhat.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