drm_gem_huge_mnt_create(9)
π drm_gem_huge_mnt_create(9) β the kernel API manual page, bestie edition π
okay so you found the drm_gem_huge_mnt_create(9) page in the Kernel API Manual and you're like "what is this even" β don't worry, I gotchu, let's go β¨
πΈ NAME πΈ
drm_gem_huge_mnt_create β create, mount and use a huge tmpfs mountpoint π«Ά
β¨ SYNOPSIS β¨
int drm_gem_huge_mnt_create (struct drm_device *dev , const char *value
);
π ARGUMENTS π
devβ the DRM device that's gonna be using this huge tmpfs mountpoint. it's giving "this mount is for ME and only ME" πvalueβ the huge tmpfs mount option value. like, the vibe of the mount, literally.
π¦ DESCRIPTION π¦
okay so this function creates and mounts a dedicated huge tmpfs mountpoint, and that mountpoint lives for the entire lifetime of the DRM device dev π₯. and where does it get used?? at GEM object initialization with drm_gem_object_init. slay.
the most common option for value is "within_size" β and ngl that one's iconic because it only allocates huge pages if the page is gonna be fully within the GEM object size. no weird partial-page situations, periodt π
"always", "advise" and "never" are supported too. but bestieβ¦ "never" would just create a mountpoint that's basically the same as the default one (shm_mnt), so like, why π.
for more info, go peek at shmemfs and Transparent Hugepage π
π RETURN π
0 on success, or a negative error code on failure. that's it, that's the whole vibe check π«Ά
β SEE ALSO β
kernel file ./drivers/gpu/drm/drm_gem.c (go read it, iykyk) plus the whole friend group π
drm_gem_init(9)drm_gem_object_init(9)drm_gem_private_object_init(9)drm_gem_private_object_fini(9)drm_gem_object_handle_get_if_exists_unlocked(9)drm_gem_object_handle_free(9)drm_gem_object_handle_put_unlocked(9)drm_gem_handle_delete(9)drm_gem_dumb_map_offset(9)drm_gem_handle_create_tail(9)drm_gem_handle_create(9)drm_gem_free_mmap_offset(9)drm_gem_create_mmap_offset_size(9)drm_gem_create_mmap_offset(9)drm_gem_get_pages(9)drm_gem_put_pages(9)drm_gem_objects_lookup(9)drm_gem_object_lookup(9)drm_gem_dma_resv_wait(9)drm_gem_open(9)drm_gem_release(9)drm_gem_object_release(9)drm_gem_object_free(9)drm_gem_vm_open(9)drm_gem_vm_close(9)drm_gem_mmap_obj(9)drm_gem_get_unmapped_area(9)drm_gem_mmap(9)drm_gem_lock_reservations(9)drm_gem_lru_init(9)drm_gem_lru_remove(9)drm_gem_lru_move_tail_locked(9)drm_gem_lru_move_tail(9)drm_gem_lru_scan(9)drm_gem_evict_locked(9)
and that's the whole page, bestie!! π§π this one's from ./drivers/gpu/drm, dated October 2026 β go forth and mount your huge tmpfs, you absolute main character ππΈ
π¦ 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