From: Paul Menzel <pmenzel+linux-mm@molgen.mpg.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org, x86@kernel.org
Subject: Re: How to profile 160 ms spent in `add_highpages_with_active_regions()`?
Date: Tue, 4 Sep 2018 11:16:02 +0200 [thread overview]
Message-ID: <d2ad2459-61ea-edb1-3b22-da92c039bfae@molgen.mpg.de> (raw)
In-Reply-To: <alpine.DEB.2.21.1808221539190.1652@nanos.tec.linutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
Dear Thomas,
On 08/22/18 15:41, Thomas Gleixner wrote:
> On Wed, 22 Aug 2018, Paul Menzel wrote:
>> Am 21.08.2018 um 11:37 schrieb Paul Menzel:
>>> [Removed non-working Pavel Tatashin <pasha.tatashin@oracle.com>]
>>
>> So “free’ing” pfn = 225278 to e_pfn = 818492 in the for loop takes 160 ms.
>
> That's 593214 pages and each one takes about 270ns. I don't see much
> optimization potential with that.
>
> 32bit and highmem sucks ...
Interestingly on my ASRock E350M1 with 4 GB, `pfn_valid()` is always true.
Additionally, after removing the for loop, the system still boots and seems
to work fine.
Here is the hunk I removed (with my debug statements).
- for ( ; pfn < e_pfn; pfn++)
- if (pfn_valid(pfn)) {
- free_highmem_page(pfn_to_page(pfn));
- //printk(KERN_INFO "%s: in for loop pfn_valid(pfn) after fre
e_highmem_page, pfn = %lu\n", __func__, pfn);
- } else {
- printk(KERN_INFO "%s: pfn = %lu is invalid\n", __func__);
- }
Is the code there for certain memory sizes?
Kind regards,
Paul
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]
next prev parent reply other threads:[~2018-09-04 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 8:12 Paul Menzel
2018-08-21 9:37 ` Paul Menzel
2018-08-22 13:25 ` Paul Menzel
2018-08-22 13:41 ` Thomas Gleixner
2018-09-04 9:16 ` Paul Menzel [this message]
2018-09-13 12:04 ` Thomas Gleixner
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=d2ad2459-61ea-edb1-3b22-da92c039bfae@molgen.mpg.de \
--to=pmenzel+linux-mm@molgen.mpg.de \
--cc=linux-mm@kvack.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox