[PATCH] ARM: mm: Speed up page list initialization during boot
Sergey Senozhatsky
sergey.senozhatsky at gmail.com
Thu Jun 16 06:36:38 PDT 2016
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
More information about the linux-arm-kernel
mailing list