[Devel] [PATCH hci-8.1 5/6] ms/drm/ttm: Convert -EAGAIN from dmem_cgroup_try_charge to -ENOSPC
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Mon Nov 2 02:56:46 MSK 2026
> From: Thomas Hellström <thomas.hellstrom at linux.intel.com>
>
> dmem_cgroup_try_charge() returns -EAGAIN when the cgroup limit is
> hit and the charge fails. TTM has no concept of -EAGAIN from resource
> allocation; -ENOSPC is the canonical error meaning "no space, try
> eviction". Convert at the source in ttm_resource_alloc() so no caller
> needs to handle an unexpected error code, and clean up the now-redundant
> -EAGAIN check in ttm_bo_alloc_resource().
>
> Without this, -EAGAIN escaping ttm_resource_alloc() during an eviction
> walk causes the walk to terminate early instead of continuing to the
> next candidate.
>
> Cc: Friedrich Vock <friedrich.vock at gmx.de>
> Cc: Maarten Lankhorst <dev at lankhorst.se>
> Cc: Tejun Heo <tj at kernel.org>
> Cc: Maxime Ripard <mripard at kernel.org>
> Cc: Christian Koenig <christian.koenig at amd.com>
> Cc: dri-devel at lists.freedesktop.org
> Cc: <stable at vger.kernel.org> # v6.14+
> Fixes: 2b624a2c1865 ("drm/ttm: Handle cgroup based eviction in TTM")
> Assisted-by: GitHub_Copilot:claude-sonnet-4.6
> Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
> Reviewed-by: Maarten Lankhorst <dev at lankhrost.se>
> Link: https://patch.msgid.link/20260508160920.230339-1-thomas.hellstrom@linux.intel.com
> (cherry picked from commit 591711b32681a04b57d00c2a404658f8419a081c)
>
> https://virtuozzo.atlassian.net/browse/VSTOR-152813
> Signed-off-by: Mirian Shilakadze <mirian.shilakadze at virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261101235155.124059-1-mirian.shilakadze@virtuozzo.com?part=5
More information about the Devel
mailing list