From: Oscar Salvador <osalvador@suse.de>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: 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, 07 Dec 2018 07:14:10 +0100 [thread overview]
Message-ID: <1544163250.3008.7.camel@suse.de> (raw)
In-Reply-To: <20181207041528.xs4xnw6vpsbu5csx@master>
> > +
>
> 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.
>
> > - 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
next prev parent reply other threads:[~2018-12-07 6:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 13:19 Oscar Salvador
2018-12-07 4:15 ` Wei Yang
2018-12-07 6:14 ` Oscar Salvador [this message]
2018-12-07 9:26 ` Wei Yang
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=1544163250.3008.7.camel@suse.de \
--to=osalvador@suse.de \
--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=richard.weiyang@gmail.com \
/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