From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Whitcroft Subject: [RFC] hugetlb reservations -- MAP_PRIVATE fixes for split vmas V2 Date: Mon, 23 Jun 2008 18:35:31 +0100 Message-ID: <1214242533-12104-1-git-send-email-apw@shadowen.org> References: <485A8903.9030808@linux.vnet.ibm.com> Return-path: In-Reply-To: <485A8903.9030808-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jon Tollefson Cc: Andrew Morton , Nick Piggin , Nishanth Aravamudan , Adam Litke , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Mel Gorman , Andy Whitcroft As reported by Adam Litke and Jon Tollefson one of the libhugetlbfs regression tests triggers a negative overall reservation count. When this occurs where there is no dynamic pool enabled tests will fail. Following this email are two patches to address this issue: hugetlb reservations: move region tracking earlier -- simply moves the region tracking code earlier so we do not have to supply prototypes, and hugetlb reservations: fix hugetlb MAP_PRIVATE reservations across vma splits -- which moves us to tracking the consumed reservation so that we can correctly calculate the remaining reservations at vma close time. This stack is against the top of v2.6.25-rc6-mm3, should this solution prove acceptable it would need slipping underneath Nick's multiple hugepage size patches and those updated. I have a modified stack prepared for that. This version incorporates Mel's feedback (both cosmetic, and an allocation under spinlock issue) and has an improved layout. Changes in V2: - commentry updates - pull allocations out from under hugetlb_lock - refactor to match shared code layout - reinstate BUG_ON's Jon could you have a test on this and see if it works out for you. -apw