Sample Header Ad - 728x90

Can I see the amount of memory which is allocated as GEM buffers?

2 votes
2 answers
2566 views
My /proc/meminfo shows about 500 MB is allocated as Shmem. I want to get more specific figures. I found an explanation here: https://lists.kernelnewbies.org/pipermail/kernelnewbies/2013-July/008628.html > It includes tmpfs memory, SysV shared memory (from ipc/shm.c), POSIX shared memory (under /dev/shm [which is a tmpfs]), and shared anonymous mappings (from mmap of /dev/zero with MAP_SHARED: see call to shmem_zero_setup() from drivers/char/mem.c): whatever allocates pages through mm/shmem.c. > > 2-> as per the developer comments NR_SHMEM included tmpfs and GEM > > pages. what is GEM pages? > Ah yes, and the Graphics Execution Manager uses shmem for objects shared with the GPU: see use of shmem_read_mapping_page*() in drivers/gpu/drm/. I have about * 50MB in user-visible tmpfs, found with df -h -t tmpfs. * 40MB (10,000 pages of 4096 bytes) in sysvipc shared memory, found with ipcs -mu. I would like to get some more positive accounting, for what uses the 500MB! Is there a way to show total GEM allocations? (Or any other likely contributor). I expect I have some GEM allocations, since I am running a graphical desktop on intel graphics hardware. My kernel version is 4.18.16-200.fc28.x86_64 (Fedora Workstation 28).
Asked by sourcejedi (53232 rep)
Nov 19, 2018, 04:15 PM
Last activity: Feb 14, 2023, 07:35 AM