Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-16 Thread Joonsoo Kim
On Tue, Jul 16, 2013 at 11:17:23AM +0530, Aneesh Kumar K.V wrote: > Joonsoo Kim writes: > > > On Mon, Jul 15, 2013 at 08:41:12PM +0530, Aneesh Kumar K.V wrote: > >> Joonsoo Kim writes: > >> > >> > If we map the region with MAP_NORESERVE and MAP_SHARED, > >> > we can skip to check reserve

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-16 Thread Joonsoo Kim
On Tue, Jul 16, 2013 at 11:17:23AM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: On Mon, Jul 15, 2013 at 08:41:12PM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: If we map the region with MAP_NORESERVE and MAP_SHARED, we can

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Aneesh Kumar K.V
Joonsoo Kim writes: > On Mon, Jul 15, 2013 at 08:41:12PM +0530, Aneesh Kumar K.V wrote: >> Joonsoo Kim writes: >> >> > 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

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Joonsoo Kim
On Mon, Jul 15, 2013 at 08:41:12PM +0530, Aneesh Kumar K.V wrote: > Joonsoo Kim writes: > > > 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

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Aneesh Kumar K.V
Joonsoo Kim writes: > 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

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Aneesh Kumar K.V
Joonsoo Kim writes: > 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

[PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 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 =

[PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 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 =

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Aneesh Kumar K.V
Joonsoo Kim iamjoonsoo@lge.com writes: 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,

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Aneesh Kumar K.V
Joonsoo Kim iamjoonsoo@lge.com writes: 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,

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Joonsoo Kim
On Mon, Jul 15, 2013 at 08:41:12PM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: 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

Re: [PATCH 7/9] mm, hugetlb: add VM_NORESERVE check in vma_has_reserves()

2013-07-15 Thread Aneesh Kumar K.V
Joonsoo Kim iamjoonsoo@lge.com writes: On Mon, Jul 15, 2013 at 08:41:12PM +0530, Aneesh Kumar K.V wrote: Joonsoo Kim iamjoonsoo@lge.com writes: 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