lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181207092646.zygzfrdnqcq6xvqm@master>
Date:   Fri, 7 Dec 2018 09:26:46 +0000
From:   Wei Yang <richard.weiyang@...il.com>
To:     Oscar Salvador <osalvador@...e.de>
Cc:     Wei Yang <richard.weiyang@...il.com>, akpm@...ux-foundation.org,
        catalin.marinas@....com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, mhocko@...e.com
Subject: Re: [PATCH] mm, kmemleak: Little optimization while scanning

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ