Re: [PATCH 2/9] mm: Provide new get_vaddr_frames() helper

2015-05-11 Thread Mel Gorman
advantage of using unsigned either and limiting it to INT_MAX either. It's not a big deal. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 2/9] mm: Provide new get_vaddr_frames() helper

2015-05-08 Thread Mel Gorman
frame_vector_to_pages(struct frame_vector *vec) +{ I think it's probably best to make the relevant counters in frame_vector signed and limit the maximum possible size of it. It's still not putting any practical limit on the size of the frame_vector. -- Mel Gorman SUSE Labs -- To unsubscribe from

Re: [PATCH 2/9] mm: Provide new get_vaddr_pfns() helper

2015-04-30 Thread Mel Gorman
* -- 2.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majord...@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: a href=mailto:d...@kvack.org; em...@kvack.org /a -- Mel Gorman SUSE Labs -- To unsubscribe from this list

Re: [PATCH 11/15] mm: trigger page reclaim in alloc_contig_range() to stabilize watermarks

2012-02-10 Thread Mel Gorman
. Use the helper to get right of this ifdef CONFIG_CMA within setup_per_zone_wmarks(). You'll still have the problem of kswapd not taking CMA pages properly into account when deciding whether to reclaim or not though. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line

Re: [PATCH 02/15] mm: page_alloc: update migrate type of pages on pcp when isolating

2012-02-03 Thread Mel Gorman
:29 +0100, Mel Gorman m...@csn.ul.ie wrote: I'm not quite seeing this. In free_hot_cold_page(), the pageblock type is checked so the page private should be set to MIGRATE_CMA or MIGRATE_ISOLATE for the CMA area. It's not clear how this can change a pageblock to MIGRATE_MOVABLE in error. Here's

Re: [PATCH 03/15] mm: compaction: introduce map_pages()

2012-02-03 Thread Mel Gorman
places. Signed-off-by: Michal Nazarewicz min...@mina86.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Mel Gorman m...@csn.ul.ie -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

Re: [PATCH 08/15] mm: mmzone: MIGRATE_CMA migration type added

2012-02-03 Thread Mel Gorman
comments that can be handled as a follow-up but otherwise Acked-by: Mel Gorman m...@csn.ul.ie diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 238fcec..993c375 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -750,6 +750,26 @@ void __meminit __free_pages_bootmem(struct page *page

Re: [PATCH 11/15] mm: trigger page reclaim in alloc_contig_range() to stabilize watermarks

2012-02-03 Thread Mel Gorman
and the machine hangs. The damage is confined to CMA though so I am not going to lose sleep over it but you might want to consider at least preventing parallel updates to min_free_kbytes from proc. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media

Re: [PATCHv20 00/15] Contiguous Memory Allocator

2012-02-03 Thread Mel Gorman
On Fri, Feb 03, 2012 at 01:18:43PM +0100, Marek Szyprowski wrote: Welcome everyone again! This is yet another quick update on Contiguous Memory Allocator patches. This version includes another set of code cleanups requested by Mel Gorman and a few minor bug fixes. I really hope

Re: [PATCH 02/15] mm: page_alloc: update migrate type of pages on pcp when isolating

2012-02-02 Thread Mel Gorman
that it is not forgotten. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 01/15] mm: page_alloc: remove trailing whitespace

2012-01-30 Thread Mel Gorman
with git blame but as it is comments that are affected; Acked-by: Mel Gorman m...@csn.ul.ie Thanks -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH 02/15] mm: page_alloc: update migrate type of pages on pcp when isolating

2012-01-30 Thread Mel Gorman
to avoid a storm of IPIs. + } else { + ++pfn; + } + } +} -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH 03/15] mm: compaction: introduce isolate_migratepages_range().

2012-01-30 Thread Mel Gorman
-by: Mel Gorman m...@csn.ul.ie @@ -313,7 +316,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, } else if (!locked) spin_lock_irq(zone-lru_lock); - if (!pfn_valid_within(low_pfn)) + if (!pfn_valid(low_pfn

Re: [PATCH 04/15] mm: compaction: introduce isolate_freepages_range()

2012-01-30 Thread Mel Gorman
; + } + + /* We don't use freelists for anything. */ + return pfn; +} + /* Returns true if the page is within a block suitable for migration to */ static bool suitable_migration_target(struct page *page) { -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send

Re: [PATCH 04/15] mm: compaction: introduce isolate_freepages_range()

2012-01-30 Thread Mel Gorman
On Mon, Jan 30, 2012 at 11:48:20AM +, Mel Gorman wrote: + if (!zone) + zone = page_zone(pfn_to_page(pfn)); + else if (zone != page_zone(pfn_to_page(pfn))) + break; + So what you are checking for here is if you straddle zones

Re: [PATCH 05/15] mm: compaction: export some of the functions

2012-01-30 Thread Mel Gorman
it. The only time this really matters is when it breaks bisection but I do not think that is the case here. Whether you fix this or not by moving the CONFIG_CMA check to the same patch that declares it in Kconfig Acked-by: Mel Gorman m...@csn.ul.ie -- Mel Gorman SUSE Labs -- To unsubscribe from

Re: [PATCH 06/15] mm: page_alloc: introduce alloc_contig_range()

2012-01-30 Thread Mel Gorman
or horrible jumped out at me other than the page_isolation.h thing and that could be argued either way so; Acked-by: Mel Gorman m...@csn.ul.ie /* #ifdef CONFIG_MEMORY_HOTREMOVE /* * All pages in the range must be isolated before calling this. -- Mel Gorman SUSE Labs -- To unsubscribe from

Re: [PATCH 07/15] mm: page_alloc: change fallbacks array handling

2012-01-30 Thread Mel Gorman
marker. The letter change, removes the implicit MIGRATE_UNMOVABLE from the end of each row which was read by __rmqueue_fallback() function. Signed-off-by: Michal Nazarewicz min...@mina86.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Acked-by: Mel Gorman m...@csn.ul.ie -- Mel

Re: [PATCH 08/15] mm: mmzone: MIGRATE_CMA migration type added

2012-01-30 Thread Mel Gorman
, Reserve, +#ifdef CONFIG_CMA + CMA, +#endif Isolate, }; -- 1.7.1.569.g6f426 -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH 10/15] mm: extract reclaim code from __alloc_pages_direct_reclaim()

2012-01-30 Thread Mel Gorman
inline int +__perform_reclaim(gfp_t gfp_mask, unsigned int order, struct zonelist *zonelist, + nodemask_t *nodemask) This function is too large to be inlined. Make it a static int. Once that is fixed add a Acked-by: Mel Gorman m...@csn.ul.ie -- Mel Gorman SUSE Labs -- To unsubscribe

Re: [PATCH 11/15] mm: trigger page reclaim in alloc_contig_range() to stabilize watermarks

2012-01-30 Thread Mel Gorman
problem 3 as it is, I would really like to see a comment explaning the problem for future users of CMA on other arches (if they exist). -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More

Re: [PATCHv19 00/15] Contiguous Memory Allocator

2012-01-30 Thread Mel Gorman
Allocator patches. This version mainly includes code cleanups requested by Mel Gorman and a few minor bug fixes. Hi Marek, Thanks for keeping up this work! I really hope it works out for the next merge window. Someone please tell me when it's time to start paying attention again

Re: [PATCH 03/15] mm: compaction: introduce isolate_migratepages_range().

2012-01-30 Thread Mel Gorman
) spin_lock_irq(zone-lru_lock); - if (!pfn_valid_within(low_pfn)) + if (!pfn_valid(low_pfn)) continue; nr_scanned++; On Mon, 30 Jan 2012 12:24:28 +0100, Mel Gorman m...@csn.ul.ie wrote: This chunk looks unrelated

Re: [PATCH 08/15] mm: mmzone: MIGRATE_CMA migration type added

2012-01-30 Thread Mel Gorman
unmovable pages in MIGRATE_CMA regions. This might have been part of the problem. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 02/15] mm: page_alloc: update migrate type of pages on pcp when isolating

2012-01-30 Thread Mel Gorman
On Mon, Jan 30, 2012 at 04:41:22PM +0100, Michal Nazarewicz wrote: On Mon, 30 Jan 2012 12:15:22 +0100, Mel Gorman m...@csn.ul.ie wrote: On Thu, Jan 26, 2012 at 10:00:44AM +0100, Marek Szyprowski wrote: From: Michal Nazarewicz min...@mina86.com @@ -139,3 +139,27 @@ int test_pages_isolated

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

2012-01-16 Thread Mel Gorman
(); + drain_all_pages(); + if (WARN_ON(test_pages_isolated(start, end))) + ret = -EBUSY; + } On Tue, 10 Jan 2012 15:16:13 +0100, Mel Gorman m...@csn.ul.ie wrote: Another global IPI seems overkill. Drain pages only from the local CPU (drain_pages(get_cpu()); put_cpu()) and test

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

2012-01-10 Thread Mel Gorman
; +} + +void free_contig_range(unsigned long pfn, unsigned nr_pages) +{ + for (; nr_pages--; ++pfn) + __free_page(pfn_to_page(pfn)); +} + #ifdef CONFIG_MEMORY_HOTREMOVE /* * All pages in the range must be isolated before calling this. -- 1.7.1.569.g6f426 -- Mel Gorman

Re: [PATCH 05/11] mm: mmzone: MIGRATE_CMA migration type added

2012-01-10 Thread Mel Gorman
, Movable, Reserve, + Cma, Isolate, }; -- 1.7.1.569.g6f426 -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 07/11] mm: add optional memory reclaim in split_free_page()

2012-01-10 Thread Mel Gorman
helper functions. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 01/11] mm: page_alloc: handle MIGRATE_ISOLATE in free_pcppages_bulk()

2011-12-12 Thread Mel Gorman
set pageblocks MIGRATE_ISOLATE. The IPIs also have overhead but it will be incurred for the rare rather than the common case. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH 02/11] mm: compaction: introduce isolate_{free,migrate}pages_range().

2011-12-12 Thread Mel Gorman
-- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 03/11] mm: mmzone: introduce zone_pfn_same_memmap()

2011-12-12 Thread Mel Gorman
:19:53 +0100, Mel Gorman m...@csn.ul.ie wrote: Is this necessary? We are isolating pages, the largest of which is a MAX_ORDER_NR_PAGES page. [...] This is not true for CMA. To be clear, I'm referring to a single page being isolated here. It may or may not be a high-order page but it's

Re: [PATCH 01/11] mm: page_alloc: handle MIGRATE_ISOLATE in free_pcppages_bulk()

2011-12-12 Thread Mel Gorman
2011 14:42:35 +0100, Mel Gorman m...@csn.ul.ie wrote: How much of a problem is this in practice? IIRC, this lead to allocation being made from area marked as isolated or some such. And I believe that nothing prevents that from happening. I was just wondering how common it was in practice

Re: [PATCH 04/11] mm: compaction: export some of the functions

2011-12-12 Thread Mel Gorman
On Mon, Dec 12, 2011 at 03:41:04PM +0100, Michal Nazarewicz wrote: On Mon, 12 Dec 2011 15:29:07 +0100, Mel Gorman m...@csn.ul.ie wrote: On Fri, Nov 18, 2011 at 05:43:11PM +0100, Marek Szyprowski wrote: From: Michal Nazarewicz min...@mina86.com This commit exports some of the functions from

Re: [PATCH 03/11] mm: mmzone: introduce zone_pfn_same_memmap()

2011-12-12 Thread Mel Gorman
:19:53 +0100, Mel Gorman m...@csn.ul.ie wrote: Is this necessary? We are isolating pages, the largest of which is a MAX_ORDER_NR_PAGES page. [...] On Mon, 12 Dec 2011 15:40:30 +0100, Mel Gorman m...@csn.ul.ie wrote: To be clear, I'm referring to a single page being isolated here. It may

Re: [PATCH 02/11] mm: compaction: introduce isolate_{free,migrate}pages_range().

2011-12-12 Thread Mel Gorman
to provide a freelist and then validate if pages on it are added in order). Please do and double check that __free_page logic too. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 02/11] mm: compaction: introduce isolate_{free,migrate}pages_range().

2011-12-12 Thread Mel Gorman
On Mon, Dec 12, 2011 at 05:46:13PM +0100, Michal Nazarewicz wrote: On Mon, 12 Dec 2011 17:30:52 +0100, Mel Gorman m...@csn.ul.ie wrote: On Mon, Dec 12, 2011 at 04:22:39PM +0100, Michal Nazarewicz wrote: SNIP + if (!pfn_valid_within(pfn)) + goto skip; The flow

Re: [PATCH 2/9] mm: alloc_contig_freed_pages() added

2011-11-01 Thread Mel Gorman
that all pages in range are in buddy system. On Tue, 18 Oct 2011 05:21:09 -0700, Mel Gorman m...@csn.ul.ie wrote: Straight away, I'm wondering why you didn't use mm/compaction.c#isolate_freepages() Does the below look like a step in the right direction? It basically moves

Re: [PATCH 2/9] mm: alloc_contig_freed_pages() added

2011-11-01 Thread Mel Gorman
the idea of making it static and removing from header file. I see no problem with that. It'll be separate from split_page() but that is not earth shattering. Thanks. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

Re: [PATCH 2/9] mm: alloc_contig_freed_pages() added

2011-10-21 Thread Mel Gorman
On Tue, Oct 18, 2011 at 10:26:37AM -0700, Michal Nazarewicz wrote: On Tue, 18 Oct 2011 05:21:09 -0700, Mel Gorman m...@csn.ul.ie wrote: At this point, I'm going to apologise for not reviewing this a long long time ago. On Thu, Oct 06, 2011 at 03:54:42PM +0200, Marek Szyprowski wrote: From

Re: [PATCH 1/9] mm: move some functions from memory_hotplug.c to page_isolation.c

2011-10-18 Thread Mel Gorman
on memory hotplug. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/9] mm: alloc_contig_freed_pages() added

2011-10-18 Thread Mel Gorman
At this point, I'm going to apologise for not reviewing this a long long time ago. On Thu, Oct 06, 2011 at 03:54:42PM +0200, Marek Szyprowski wrote: From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com This commit introduces alloc_contig_freed_pages() function which allocates (ie. removes

Re: [PATCH 3/9] mm: alloc_contig_range() added

2011-10-18 Thread Mel Gorman
On Thu, Oct 06, 2011 at 03:54:43PM +0200, Marek Szyprowski wrote: From: Michal Nazarewicz m.nazarew...@samsung.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

Re: [PATCH 4/9] mm: MIGRATE_CMA migration type added

2011-10-18 Thread Mel Gorman
On Thu, Oct 06, 2011 at 03:54:44PM +0200, Marek Szyprowski wrote: From: Michal Nazarewicz m.nazarew...@samsung.com The MIGRATE_CMA migration type has two main characteristics: (i) only movable pages can be allocated from MIGRATE_CMA pageblocks and (ii) page allocator will never change

Re: [PATCH 6/9] drivers: add Contiguous Memory Allocator

2011-10-18 Thread Mel Gorman
On Thu, Oct 06, 2011 at 03:54:46PM +0200, Marek Szyprowski wrote: The Contiguous Memory Allocator is a set of helper functions for DMA mapping framework that improves allocations of contiguous memory chunks. CMA grabs memory on system boot, marks it with CMA_MIGRATE_TYPE and gives back to

Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator framework

2010-08-26 Thread Mel Gorman
of memory in a zone unusable by non-movable allocationos. It would be a lot trickier when interacting with reclaim though so using ZONE_MOVABLE would have less gotchas. -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM

Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator framework

2010-08-26 Thread Mel Gorman
...@kvack.org; em...@kvack.org /a -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord