From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: selftests/mm: hmm-tests: don't hardcode THP size to 2MB
Date: Tue, 31 Mar 2026 16:41:10 +1000 [thread overview]
Message-ID: <review-patch2-20260331063445.3551404-3-apopple@nvidia.com> (raw)
In-Reply-To: <20260331063445.3551404-3-apopple@nvidia.com>
Patch Review
This is a clean, correct fix. Good use of existing helpers.
**Positive observations:**
- Correctly replaces `TWOMEG` with `read_pmd_pagesize()` in all THP-related tests.
- The `TWOMEG` define and its remaining uses (lines 790, 1571) are kept for hugetlbfs alignment where a fixed minimum size is appropriate.
- The custom `file_read_ulong()` helper is properly replaced with `default_huge_page_size()` from `vm_util.h`, reducing code duplication.
- The `size /= 2` change in `anon_write_huge` is a nice simplification that avoids calling `read_pmd_pagesize()` twice.
**Minor nit:** The `#define TWOMEG (1 << 21)` is still present at line 57 but only used in two places for hugetlbfs alignment. Could add a comment clarifying it's not THP size, but this is very minor.
**No issues found.** This patch looks correct.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-31 6:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 6:34 [PATCH 0/3] Minor hmm_test fixes and cleanups Alistair Popple
2026-03-31 6:34 ` [PATCH 1/3] lib: test_hmm: evict device pages on file close to avoid use-after-free Alistair Popple
2026-03-31 6:41 ` Claude review: " Claude Code Review Bot
2026-03-31 6:34 ` [PATCH 2/3] selftests/mm: hmm-tests: don't hardcode THP size to 2MB Alistair Popple
2026-03-31 6:41 ` Claude Code Review Bot [this message]
2026-03-31 6:34 ` [PATCH 3/3] lib: test_hmm: Implement a device release method Alistair Popple
2026-03-31 6:41 ` Claude review: " Claude Code Review Bot
2026-03-31 6:41 ` Claude review: Minor hmm_test fixes and cleanups 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-20260331063445.3551404-3-apopple@nvidia.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