From: Wei Yang <richard.weiyang@gmail.com>
To: Oscar Salvador <osalvador@suse.de>
Cc: Wei Yang <richard.weiyang@gmail.com>,
akpm@linux-foundation.org, catalin.marinas@arm.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
mhocko@suse.com
Subject: Re: [PATCH] mm, kmemleak: Little optimization while scanning
Date: Fri, 7 Dec 2018 09:26:46 +0000 [thread overview]
Message-ID: <20181207092646.zygzfrdnqcq6xvqm@master> (raw)
In-Reply-To: <1544163250.3008.7.camel@suse.de>
On Fri, Dec 07, 2018 at 07:14:10AM +0100, Oscar Salvador wrote:
>
>> > +
>>
>> This one maybe not necessary.
>
>Yeah, that is a remind of an include file I used for time measurement.
>I hope Andrew can drop that if this is taken.
>
>> > /*
>> > * Kmemleak configuration and common defines.
>> > */
>> > @@ -1547,11 +1548,14 @@ static void kmemleak_scan(void)
>> > unsigned long pfn;
>> >
>> > for (pfn = start_pfn; pfn < end_pfn; pfn++) {
>> > - struct page *page;
>> > + struct page *page =
>> > pfn_to_online_page(pfn);
>> > +
>> > + if (!page)
>> > + continue;
>> >
>> > - if (!pfn_valid(pfn))
>> > + /* only scan pages belonging to this node
>> > */
>> > + if (page_to_nid(page) != i)
>> > continue;
>>
>> Not farmiliar with this situation. Is this often?
>Well, hard to tell how often that happens because that mostly depends
>on the Hardware in case of baremetal.
>Virtual systems can also have it though.
>
Ok, generally looks good to me.
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
>>
>> > - page = pfn_to_page(pfn);
>> > /* only scan if page is in use */
>> > if (page_count(page) == 0)
>> > continue;
>> > --
>> > 2.13.7
>>
>>
>--
>Oscar Salvador
>SUSE L3
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2018-12-07 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 13:19 [PATCH] mm, kmemleak: Little optimization while scanning Oscar Salvador
2018-12-07 4:15 ` Wei Yang
2018-12-07 6:14 ` Oscar Salvador
2018-12-07 9:26 ` Wei Yang [this message]
2018-12-07 6:06 ` Oscar Salvador
2018-12-07 9:48 ` Catalin Marinas
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=20181207092646.zygzfrdnqcq6xvqm@master \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).