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: drm/amdgpu: add SVM attr prefetch/force-trigger functionality
Date: Tue, 28 Apr 2026 14:43:04 +1000	[thread overview]
Message-ID: <review-patch4-20260427100522.7014-5-Junhua.Shen@amd.com> (raw)
In-Reply-To: <20260427100522.7014-5-Junhua.Shen@amd.com>

Patch Review

**Overall:** Small and focused. The one-shot prefetch semantics are well-motivated.

**Issue: `preferred_loc` changes no longer trigger `LOCATION_CHANGE`:**
```c
-	if (prev_attrs->preferred_loc != new_attrs->preferred_loc ||
-	    prev_attrs->prefetch_loc != new_attrs->prefetch_loc)
+	if (prev_attrs->prefetch_loc != new_attrs->prefetch_loc)
 		trigger |= AMDGPU_SVM_ATTR_TRIGGER_LOCATION_CHANGE;
```
This means changing `preferred_loc` alone will never trigger migration. In patch 5, `amdgpu_svm_range_apply_attr_change()` only acts on `AMDGPU_SVM_ATTR_TRIGGER_LOCATION_CHANGE` for migration. So if userspace sets a new `preferred_loc` without also issuing a prefetch, the new location preference won't take effect until the next fault or restore event. Is this intentional? The commit message doesn't explain this tradeoff.

**Good:** The `force_trigger` change from `bool` to `uint32_t` bitmask is the right approach — it allows composing multiple trigger reasons.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-28  4:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 10:05 [PATCH v3 0/5] drm/amdgpu: SVM VRAM migration via drm_pagemap Junhua Shen
2026-04-27 10:05 ` [PATCH v3 1/5] drm/amdgpu: add VRAM migration infrastructure for drm_pagemap Junhua Shen
2026-04-28  4:43   ` Claude review: " Claude Code Review Bot
2026-04-27 10:05 ` [PATCH v3 2/5] drm/amdgpu: implement drm_pagemap SDMA migration callbacks Junhua Shen
2026-04-27 22:20   ` Felix Kuehling
2026-04-28  4:43   ` Claude review: " Claude Code Review Bot
2026-04-27 10:05 ` [PATCH v3 3/5] drm/amdgpu: introduce SVM range migration decision layer Junhua Shen
2026-04-28  4:43   ` Claude review: " Claude Code Review Bot
2026-04-27 10:05 ` [PATCH v3 4/5] drm/amdgpu: add SVM attr prefetch/force-trigger functionality Junhua Shen
2026-04-28  4:43   ` Claude Code Review Bot [this message]
2026-04-27 10:05 ` [PATCH v3 5/5] drm/amdgpu: integrate VRAM migration into SVM range map path Junhua Shen
2026-04-28  4:43   ` Claude review: " Claude Code Review Bot
2026-04-28  4:43 ` Claude review: drm/amdgpu: SVM VRAM migration via drm_pagemap 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-patch4-20260427100522.7014-5-Junhua.Shen@amd.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