From: Jaewon Kim <jaewon31.kim@gmail.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Jaewon Kim <jaewon31.kim@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>,
mhocko@suse.com, vbabka@suse.cz, minchan@kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: page_ext: allocate page extension though first PFN is invalid
Date: Wed, 8 Nov 2017 22:33:51 +0900 [thread overview]
Message-ID: <CAJrd-UtqWQiqgtfZQDxt18BnqYFgOZOw9pqNJY6UUp71POLOpQ@mail.gmail.com> (raw)
In-Reply-To: <20171108075242.GB18747@js1304-P5Q-DELUXE>
2017-11-08 16:52 GMT+09:00 Joonsoo Kim <iamjoonsoo.kim@lge.com>:
> On Tue, Nov 07, 2017 at 06:44:47PM +0900, Jaewon Kim wrote:
>> online_page_ext and page_ext_init allocate page_ext for each section, but
>> they do not allocate if the first PFN is !pfn_present(pfn) or
>> !pfn_valid(pfn).
>>
>> Though the first page is not valid, page_ext could be useful for other
>> pages in the section. But checking all PFNs in a section may be time
>> consuming job. Let's check each (section count / 16) PFN, then prepare
>> page_ext if any PFN is present or valid.
>
> I guess that this kind of section is not so many. And, this is for
> debugging so completeness would be important. It's better to check
> all pfn in the section.
Thank you for your comment.
AFAIK physical memory address depends on HW SoC.
Sometimes a SoC remains few GB address region hole between few GB DRAM
and other few GB DRAM
such as 2GB under 4GB address and 2GB beyond 4GB address and holes between them.
If SoC designs so big hole between actual mapping, I thought too much
time will be spent on just checking all the PFNs.
Anyway if we decide to check all PFNs, I can change patch to t_pfn++ like below.
Please give me comment again.
while (t_pfn < ALIGN(pfn + 1, PAGES_PER_SECTION)) {
if (pfn_valid(t_pfn)) {
valid = true;
break;
}
- t_pfn = ALIGN(pfn + 1, PAGES_PER_SECTION >> 4);
+ t_pfn++;
Thank you
Jaewon Kim
>
> Thanks.
>
--
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>
next prev parent reply other threads:[~2017-11-08 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171107094311epcas1p4a5dd975d6e9f3618a26a0a5d68c68b55@epcas1p4.samsung.com>
2017-11-07 9:44 ` Jaewon Kim
2017-11-08 7:52 ` Joonsoo Kim
2017-11-08 13:33 ` Jaewon Kim [this message]
2017-11-09 4:33 ` Joonsoo Kim
[not found] <CGME20171102063347epcas2p2ce3e91597de3bf68e818130ea44ac769@epcas2p2.samsung.com>
2017-11-02 6:35 ` Jaewon Kim
2017-11-02 8:02 ` Michal Hocko
2017-11-06 22:30 ` Jaewon Kim
2017-11-07 7:47 ` Michal Hocko
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=CAJrd-UtqWQiqgtfZQDxt18BnqYFgOZOw9pqNJY6UUp71POLOpQ@mail.gmail.com \
--to=jaewon31.kim@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=jaewon31.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=vbabka@suse.cz \
/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