From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) Description of problem: If I mount hugetlbfs at /dev/shm, rather than the default tmpfs, the filenames of shared memory segments are no longer listed in /dev/shm Version-Release number of selected component (if applicable): kernel-2.6.18-8.1.0.el5 How reproducible: Always Steps to Reproduce: 1. mount hugetlbfs at /dev/shm e.g. sysctl vm.nr_hugepages=3000 ; umount /dev/shm ; mount -t hugetlbfs /dev/shm -o size=6G 2. Run a program that allocated shared memory with shm_open(), e.g. http://mij.oltrelinux.com/devel/unixprg/srcs/ipc__shm/1/shm_msgserver.c 3. ls /dev/shm 4. Run a program to read the shared memory e.g. http://mij.oltrelinux.com/devel/unixprg/srcs/ipc__shm/1/shm_msgclient.c Actual Results: ls /dev/shm returns nothing, even though the programs work and shared memory is clearly being allocated. Expected Results: ls /dev/shm should return the name associated with the shm descriptor. Additional info:
hugetlbfs is only used as a method to allow non-super user users to allocate hugepages. If you mount a hugetlbfs fs, that user can allocate hugepages using mmap on that fs. If you look at Documentation/vm/hugetlbpage.txt you will see this. It is not meant as a different way to mount /dev/shm. This isn't a bug, closing.