On 10/15/19 3:50 AM, Michal Hocko wrote: > On Tue 15-10-19 11:01:12, Piotr Sarna wrote: >> With hugetlbfs, a common pattern for mapping anonymous huge pages >> is to create a temporary file first. > > Really? I though that this is normally done by shmget(SHM_HUGETLB) or > mmap(MAP_HUGETLB). Or maybe I misunderstood your definition on anonymous > huge pages. > >> Currently libraries like >> libhugetlbfs and seastar create these with a standard mkstemp+unlink >> trick, I would guess that much of libhugetlbfs was writen before MAP_HUGETLB was implemented. So, that is why it does not make (more) use of that option. The implementation looks to be straight forward. However, I really do not want to add more functionality to hugetlbfs unless there is specific use case that needs it. -- Mike Kravetz