On (06/16/16 11:18), Sergey Senozhatsky wrote: > On (01/05/16 18:56), Jungseung Lee wrote: > [..] > > > > >> #ifdef CONFIG_HIGHMEM > > > > >> static inline void free_area_high(unsigned long pfn, unsigned long > > > > >>end) { > > > > >>- for (; pfn < end; pfn++) > > > > >>- free_highmem_page(pfn_to_page(pfn)); > > > > >>+ while (pfn < end) { > > > > >>+ struct page *page = pfn_to_page(pfn); > > > > >>+ unsigned long order = min(__ffs(pfn), MAX_ORDER - 1); > > > > >>+ unsigned long nr_pages = 1 << order; > > > > >>+ unsigned long rem = end - pfn; > > > > >>+ > > > > >>+ if (nr_pages > rem) { > > > > >>+ order = __fls(rem); > > > > >>+ nr_pages = 1 << order; > > > > >>+ } > > > > >>+ > > > > >>+ __free_pages_bootmem(page, order); > > > > >>+ totalram_pages += nr_pages; > > > > >>+ totalhigh_pages += nr_pages; > > + page_zone(page)->managed_pages += nr_pages; ??? ah, no. __free_pages_boot_core() seems to do it. sorry for the noise. -ss -- 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>