Re: [PATCH v2 2/4] mm/hugetlb: Setup hugetlb_falloc during fallocate hole punch

2015-10-20 Thread Mike Kravetz
On 10/20/2015 05:11 PM, Dave Hansen wrote: > On 10/20/2015 04:52 PM, Mike Kravetz wrote: >> if (hole_end > hole_start) { >> struct address_space *mapping = inode->i_mapping; >> +DECLARE_WAIT_QUEUE_HEAD_ONSTACK(hugetlb_falloc_waitq); >> +/* >> +

Re: [PATCH v2 2/4] mm/hugetlb: Setup hugetlb_falloc during fallocate hole punch

2015-10-20 Thread Dave Hansen
On 10/20/2015 04:52 PM, Mike Kravetz wrote: > if (hole_end > hole_start) { > struct address_space *mapping = inode->i_mapping; > + DECLARE_WAIT_QUEUE_HEAD_ONSTACK(hugetlb_falloc_waitq); > + /* > + * Page faults on the area to be hole punched

[PATCH v2 2/4] mm/hugetlb: Setup hugetlb_falloc during fallocate hole punch

2015-10-20 Thread Mike Kravetz
When performing a fallocate hole punch, set up a hugetlb_falloc struct and make i_private point to it. i_private will point to this struct for the duration of the operation. At the end of the operation, wake up anyone who faulted on the hole and is on the waitq. Signed-off-by: Mike Kravetz ---