From: Yisheng Xie <xieyisheng1@huawei.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: akpm@linux-foundation.org, mhocko@kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kmemcheck: add scheduling point to kmemleak_scan
Date: Mon, 20 Nov 2017 17:46:30 +0800 [thread overview]
Message-ID: <5b0d183d-a251-6ee5-7f5c-d58c9b90cd80@huawei.com> (raw)
In-Reply-To: <20171117182722.vhgzd5rj3qgv7a6f@armageddon.cambridge.arm.com>
Hi Catalin,
On 2017/11/18 2:27, Catalin Marinas wrote:
> Please fix the subject as the tool is called "kmemleak" rather than
> "kmemcheck".
Yeah, this really is a terrible typo.
>
> On Fri, Nov 17, 2017 at 03:03:56PM +0800, Yisheng Xie wrote:
>> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
>> index e4738d5..e9f2e86 100644
>> --- a/mm/kmemleak.c
>> +++ b/mm/kmemleak.c
>> @@ -1523,6 +1523,8 @@ static void kmemleak_scan(void)
>> if (page_count(page) == 0)
>> continue;
>> scan_block(page, page + 1, NULL);
>> + if (!(pfn % 1024))
>> + cond_resched();
>
> For consistency with the other places where we call cond_resched() in
> kmemleak, I would use MAX_SCAN_SIZE. Something like
>
> if (!(pfn % (MAX_SCAN_SIZE / sizeof(page))))
> cont_resched();
Yes, this will keep it consistency with the other places.
I will take both of these suggestion in next version.
Thanks
Yisheng Xie
>
> 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>
prev parent reply other threads:[~2017-11-20 9:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 7:03 Yisheng Xie
2017-11-17 18:27 ` Catalin Marinas
2017-11-20 9:46 ` Yisheng Xie [this message]
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=5b0d183d-a251-6ee5-7f5c-d58c9b90cd80@huawei.com \
--to=xieyisheng1@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@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