Re: [PATCH v2 08/10] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-23 Thread Michal Hocko
On Mon 22-07-13 17:36:29, Joonsoo Kim wrote: > If we map the region with MAP_NORESERVE and MAP_SHARED, > we can skip to check reserve counting and eventually we cannot be ensured > to allocate a huge page in fault time. > With following example code, you can easily find this situation. > > Assume

[PATCH v2 08/10] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-22 Thread Joonsoo Kim
If we map the region with MAP_NORESERVE and MAP_SHARED, we can skip to check reserve counting and eventually we cannot be ensured to allocate a huge page in fault time. With following example code, you can easily find this situation. Assume 2MB, nr_hugepages = 100 fd = hugetlbfs_unlinked_