drm_gem_huge_mnt_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ‘‘


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