All of lore.kernel.org
 help / color / mirror / Atom feed
From: sergey.senozhatsky@gmail.com (Sergey Senozhatsky)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mm: Speed up page list initialization during boot
Date: Thu, 16 Jun 2016 22:36:38 +0900	[thread overview]
Message-ID: <20160616133638.GA523@swordfish> (raw)
In-Reply-To: <20160616021813.GB658@swordfish>

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

WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: 'Chirantan Ekbote' <chirantan@chromium.org>,
	Jungseung Lee <js07.lee@samsung.com>,
	'Russell King - ARM Linux' <linux@arm.linux.org.uk>,
	linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org,
	js07.lee@gmail.com,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH] ARM: mm: Speed up page list initialization during boot
Date: Thu, 16 Jun 2016 22:36:38 +0900	[thread overview]
Message-ID: <20160616133638.GA523@swordfish> (raw)
In-Reply-To: <20160616021813.GB658@swordfish>

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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-06-16 13:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <004001d14158$114be8d0$33e3ba70$@samsung.com>
2015-12-28 10:15 ` [PATCH] ARM: mm: Speed up page list initialization during boot Jungseung Lee
2015-12-28 10:15   ` Jungseung Lee
2015-12-31 13:05   ` Chirantan Ekbote
2015-12-31 13:05     ` Chirantan Ekbote
2016-01-02 10:37     ` Russell King - ARM Linux
2016-01-02 10:37       ` Russell King - ARM Linux
2016-01-05  9:56       ` Jungseung Lee
2016-01-05  9:56         ` Jungseung Lee
2016-06-16  2:18         ` Sergey Senozhatsky
2016-06-16  2:18           ` Sergey Senozhatsky
2016-06-16 13:36           ` Sergey Senozhatsky [this message]
2016-06-16 13:36             ` Sergey Senozhatsky
2014-03-21 19:15 Chirantan Ekbote
2014-03-21 19:15 ` Chirantan Ekbote
2014-03-21 19:15 ` Chirantan Ekbote

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160616133638.GA523@swordfish \
    --to=sergey.senozhatsky@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.