From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/ttm: Extract code for attempting allocation in a place Date: Fri, 27 Feb 2026 13:36:28 +1000 Message-ID: In-Reply-To: <20260225-dmemcg-aggressive-protect-v4-3-de847ab35184@gmx.de> References: <20260225-dmemcg-aggressive-protect-v4-0-de847ab35184@gmx.de> <20260225-dmemcg-aggressive-protect-v4-3-de847ab35184@gmx.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Good refactoring that cleanly separates allocation-at-a-place logic into `t= tm_bo_alloc_at_place()`. The `struct ttm_bo_alloc_state` is well-designed f= or the extensions coming in later patches. The return code semantics are well documented: ```c + * Returns: + * -EBUSY: No space available, but allocation should be retried with ttm_b= o_evict_alloc. + * -ENOSPC: No space available, allocation should not be retried. + * -ERESTARTSYS: An interruptible sleep was interrupted by a signal. ``` The error handling translation in `ttm_bo_alloc_at_place` correctly maps `-= EAGAIN` (charge failure) to either `-EBUSY` or `-ENOSPC` based on `may_evic= t`, and the caller handles all three cases (`-ENOSPC` =E2=86=92 continue, `= -EBUSY` =E2=86=92 try evict, other =E2=86=92 return). This is equivalent to= the original inline code. The movement of `limit_pool` from `ttm_bo_evict_walk` to `ttm_bo_alloc_stat= e` (accessed via pointer) is a clean design that avoids duplication and set= s up well for patch 6. No issues. --- Generated by Claude Code Patch Reviewer