RE: [Linaro-mm-sig] [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-18 Thread Marek Szyprowski
Hello, On Tuesday, January 17, 2012 10:54 PM sandeep patil wrote: I am running a CMA test where I keep allocating from a CMA region as long as the allocation fails due to lack of space. However, I am seeing failures much before I expect them to happen. When the allocation fails, I see a

Re: [Linaro-mm-sig] [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-17 Thread sandeep patil
Marek, I am running a CMA test where I keep allocating from a CMA region as long as the allocation fails due to lack of space. However, I am seeing failures much before I expect them to happen. When the allocation fails, I see a warning coming from __alloc_contig_range(), because

Re: [Linaro-mm-sig] [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-17 Thread Michal Nazarewicz
On Tue, 17 Jan 2012 22:54:28 +0100, sandeep patil psandee...@gmail.com wrote: Marek, I am running a CMA test where I keep allocating from a CMA region as long as the allocation fails due to lack of space. However, I am seeing failures much before I expect them to happen. When the allocation

Re: [Linaro-mm-sig] [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-17 Thread sandeep patil
Yeah, we are wondering ourselves about that.  Could you try cherry-picking commit ad10eb079c97e27b4d27bc755c605226ce1625de (update migrate type on pcp when isolating) from git://github.com/mina86/linux-2.6.git?  It probably won't apply cleanly but resolving the conflicts should not be hard

Re: [Linaro-mm-sig] [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-17 Thread Michal Nazarewicz
My understanding of that situation is that the page is on pcp list in which cases it's page_private is not updated. Draining and the first patch in the series (and also the commit I've pointed to above) are designed to fix that but I'm unsure why they don't work all the time. On Wed, 18 Jan

Re: [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-16 Thread Mel Gorman
On Fri, Jan 13, 2012 at 09:04:31PM +0100, Michal Nazarewicz wrote: On Thu, Dec 29, 2011 at 01:39:05PM +0100, Marek Szyprowski wrote: From: Michal Nazarewicz min...@mina86.com + /* Make sure all pages are isolated. */ + if (!ret) { + lru_add_drain_all(); +

Re: [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-16 Thread Michal Nazarewicz
On Mon, 16 Jan 2012 10:01:10 +0100, Mel Gorman m...@csn.ul.ie wrote: On Fri, Jan 13, 2012 at 09:04:31PM +0100, Michal Nazarewicz wrote: On Thu, Dec 29, 2011 at 01:39:05PM +0100, Marek Szyprowski wrote: From: Michal Nazarewicz min...@mina86.com + /* Make sure all pages are isolated. */ +

Re: [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-13 Thread Michal Nazarewicz
On Thu, Dec 29, 2011 at 01:39:05PM +0100, Marek Szyprowski wrote: From: Michal Nazarewicz min...@mina86.com + /* Make sure all pages are isolated. */ + if (!ret) { + lru_add_drain_all(); + drain_all_pages(); + if

Re: [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2012-01-10 Thread Mel Gorman
On Thu, Dec 29, 2011 at 01:39:05PM +0100, Marek Szyprowski wrote: From: Michal Nazarewicz min...@mina86.com This commit adds the alloc_contig_range() function which tries to allocate given range of pages. It tries to migrate all already allocated pages that fall in the range thus freeing

[PATCH 04/11] mm: page_alloc: introduce alloc_contig_range()

2011-12-29 Thread Marek Szyprowski
From: Michal Nazarewicz min...@mina86.com This commit adds the alloc_contig_range() function which tries to allocate given range of pages. It tries to migrate all already allocated pages that fall in the range thus freeing them. Once all pages in the range are freed they are removed from the