Unverified Commit 2b624a2c authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Maxime Ripard
Browse files

drm/ttm: Handle cgroup based eviction in TTM



cgroup resource allocation has to be handled in TTM, so -EAGAIN from
cgroups can be converted into -ENOSPC, and the limitcg can be properly
evicted in ttm code.

When hitting a resource limit through -EAGAIN, the cgroup for which the
limit is hit is also returned. This allows eviction to delete only from
cgroups which are a subgroup of the current cgroup.

The returned CSS is used to determine if eviction is valuable for a
given resource, and allows TTM to only target specific resources to
lower memory usage.

Co-developed-by: default avatarFriedrich Vock <friedrich.vock@gmx.de>
Signed-off-by: default avatarFriedrich Vock <friedrich.vock@gmx.de>
Co-developed-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarMaarten Lankhorst <dev@lankhorst.se>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20241204134410.1161769-4-dev@lankhorst.se


Signed-off-by: default avatarMaxime Ripard <mripard@kernel.org>
parent 7b0af165
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment