From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260331063445.3551404-3-apopple@nvidia.com> References: <20260331063445.3551404-1-apopple@nvidia.com> <20260331063445.3551404-3-apopple@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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