MIGRATION VS EVICTION(9)
π Migration vs eviction(9) β a Kernel API Manual moment
okay so bestie, this one's a short one but it's important, it's a Migration vs eviction page from the Kernel API Manual and it's basically the "these two things are NOT the same, don't @ me" of the DRM world π
β¨ DESCRIPTION β¨ (the whole vibe)
lowkey the biggest thing to internalise here: GEM migration may not be the same as TTM migration / eviction. they are two different girlies. do not conflate them. π
so here's the situation. if the TTM core decides to evict an object, that object may get evicted to a TTM memory type that is not in the object's allowable GEM regions β or, and this is wild, theoretically to a TTM memory type that doesn't even correspond to a GEM memory region at all π like it's just out here in the void.
and in that case? the object's GEM region is not updated, and the data gets migrated back to the GEM region at get_pages time. that's the little reunion arc π«Ά
TTM may however set up CPU ptes to the object even when it is evicted β so yeah, ptes don't care, they're doing their own thing.
then there's Gem forced migration using the i915_ttm_migrate op β and she is allowed to go even to regions that are not in the object's list of allowable placements. forced means forced, she does what she wants π
ngl this is the kind of page where you read it once, nod, and then re-read it in three months when something's weird. keep it bookmarked bestie. π₯
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/i915/gem/i915_gem_ttm.cstructi915_ttm_tt(9) i915_ttm_sys_placement(9)i915_ttm_free_cached_io_rsgt(9)i915_ttm_purge(9)i915_ttm_resource_get_st(9)i915_ttm_resource_mappable(9)i915_ttm_driver(9)i915_ttm_adjust_lru(9)
π that's the whole page, no cap. it lives at ./drivers/gpu/drm/i915/gem, dated October 2026, and it's still out here being Migration vs eviction(9), iconic behaviour honestly. mwah, go read the source πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms