STRUCT DRM_GEM_LRU(9)
okay bestie, we're in the Kernel API Manual and this page is struct drm_gem_lru(9) β let's get into it π
β¨
π NAME π
struct drm_gem_lru β a simple LRU helper. That's the whole vibe, no cap. π
π¦ SYNOPSIS π¦
Okay so here's the struct, literally:
struct drm_gem_lru {
long count;
struct list_head list;
};
πΈ Members πΈ
countβ the total number of backing pages of the GEM objects in this LRU. It's giving page-count main character π₯listβ the LRU list. Periodt. π
β¨ Description β¨
So this little struct is a helper for tracking GEM objects in a given state, and it's here to aid in the driver's shrinker implementation. Lowkey iconic. π«Ά
It tracks the count of pages for lockless shrinker.count_objects, and it provides drm_gem_lru_scan for the driver's shrinker.scan_objects implementation. Obsessed. β
β οΈ bestie, important: any access to this kind of object must be done with drm_device::gem_lru_mutex held. Not me stressing this β fr fr, don't skip it. ππ
π SEE ALSO π
Kernel file ./include/drm/drm_gem.h β plus all these besties:
enum drm_gem_object_status(9)struct drm_gem_object_funcs(9)struct drm_gem_object(9)DRM_GEM_FOPS(9)DEFINE_DRM_GEM_FOPS(9)drm_gem_get_huge_mnt(9)drm_gem_object_get(9)drm_gem_object_put(9)drm_gem_object_is_shared_for_memory_stats(9)drm_gem_is_imported(9)drm_gem_gpuva_init(9)drm_gem_for_each_gpuvm_bo(9)drm_gem_for_each_gpuvm_bo_safe(9)
and that's the page, bestie β sourced from ./include/drm, dated October 2026, struct drm_gem_lru(9) byeee ππ¦β¨
π¦ 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