linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Yisheng Xie <xieyisheng1@huawei.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: Fri, 17 Nov 2017 18:27:22 +0000	[thread overview]
Message-ID: <20171117182722.vhgzd5rj3qgv7a6f@armageddon.cambridge.arm.com> (raw)
In-Reply-To: <1510902236-4444-1-git-send-email-xieyisheng1@huawei.com>

Please fix the subject as the tool is called "kmemleak" rather than
"kmemcheck".

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();

Thanks.

-- 
Catalin

--
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>

  reply	other threads:[~2017-11-17 18:27 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 [this message]
2017-11-20  9:46   ` Yisheng Xie

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=20171117182722.vhgzd5rj3qgv7a6f@armageddon.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=xieyisheng1@huawei.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