Re: [RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate()

2015-04-17 Thread Mike Kravetz
On 04/17/2015 01:00 AM, Hillf Danton wrote: + clear_huge_page(page, addr, pages_per_huge_page(h)); + __SetPageUptodate(page); + error = huge_add_to_page_cache(page, mapping, index); + if (error) { + put_page(page); +

Re: [RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate()

2015-04-17 Thread Hillf Danton
> > This is based on the shmem version, but it has diverged quite > a bit. We have no swap to worry about, nor the new file sealing. > > What this allows us to do is move physical memory in and out of > a hugetlbfs file without having it mapped. This also gives us > the ability to support MADV_

[RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate()

2015-04-16 Thread Mike Kravetz
This is based on the shmem version, but it has diverged quite a bit. We have no swap to worry about, nor the new file sealing. What this allows us to do is move physical memory in and out of a hugetlbfs file without having it mapped. This also gives us the ability to support MADV_REMOVE since it