On Wed, Nov 16, 2016 at 12:23:13PM +0530, Aneesh Kumar K.V wrote: > > Hi, > > I was looking at this w.r.t a recent patch series and wondering whether > the usage of alloc_contig_page is correct there. We do > > > static int __alloc_gigantic_page(unsigned long start_pfn, > unsigned long nr_pages) > { > unsigned long end_pfn = start_pfn + nr_pages; > return alloc_contig_range(start_pfn, end_pfn, MIGRATE_MOVABLE); > } > > > That implies, if we fail in certain case we will mark the page block > migrate type MIGRATE_MOVABLE . Do we want to do that in all case ? > What if the start_pfn was convering a page block of MIGRATE_CMA type ? > Should we skip pageblock with MIGRATE_CMA type when trying to allocate > gigantic huge page ? I have not read the code so deep. I will study it when I have time. Btw: Do we really need the free_contig_range() run like this? free page one by one? I guess we can optimize it to free pages at the unit of the page order. Thanks Huang Shijie -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>