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 v2] kmemleak: add scheduling point to kmemleak_scan
Date: Thu, 23 Nov 2017 14:38:00 +0000	[thread overview]
Message-ID: <20171123143759.ja2qmsqbjxh4u36e@armageddon.cambridge.arm.com> (raw)
In-Reply-To: <1511439788-20099-1-git-send-email-xieyisheng1@huawei.com>

On Thu, Nov 23, 2017 at 08:23:08PM +0800, Yisheng Xie wrote:
> kmemleak_scan will scan struct page for each node and it can be really
> large and resulting in a soft lockup. We have seen a soft lockup when do
> scan while compile kernel:
> 
>  [  220.561051] watchdog: BUG: soft lockup - CPU#53 stuck for 22s! [bash:10287]
>  [...]
>  [  220.753837] Call Trace:
>  [  220.756296]  kmemleak_scan+0x21a/0x4c0
>  [  220.760034]  kmemleak_write+0x312/0x350
>  [  220.763866]  ? do_wp_page+0x147/0x4c0
>  [  220.767521]  full_proxy_write+0x5a/0xa0
>  [  220.771351]  __vfs_write+0x33/0x150
>  [  220.774833]  ? __inode_security_revalidate+0x4c/0x60
>  [  220.779782]  ? selinux_file_permission+0xda/0x130
>  [  220.784479]  ? _cond_resched+0x15/0x30
>  [  220.788221]  vfs_write+0xad/0x1a0
>  [  220.791529]  SyS_write+0x52/0xc0
>  [  220.794758]  do_syscall_64+0x61/0x1a0
>  [  220.798411]  entry_SYSCALL64_slow_path+0x25/0x25
> 
> Fix this by adding cond_resched every MAX_SCAN_SIZE.
> 
> Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

--
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-23 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 12:23 Yisheng Xie
2017-11-23 14:38 ` Catalin Marinas [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=20171123143759.ja2qmsqbjxh4u36e@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