linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Waiman Long <longman@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Yisheng Xie <xieyisheng1@huawei.com>
Subject: Re: [PATCH] mm/kmemleak: Move up cond_resched() call in page scanning loop
Date: Sun, 27 Aug 2023 16:07:55 +0300	[thread overview]
Message-ID: <ZOtKq99/aZCNkav6@arm.com> (raw)
In-Reply-To: <20230825164947.1317981-1-longman@redhat.com>

On Fri, Aug 25, 2023 at 12:49:47PM -0400, Waiman Long wrote:
> Commit bde5f6bc68db ("kmemleak: add scheduling point to kmemleak_scan()")
> added a cond_resched() call to the struct page scanning loop to prevent
> soft lockup from happening. However, soft lockup can still happen in
> that loop in some corner cases when the pages that satisfy the "!(pfn &
> 63)" check are skipped for some reasons.
> 
> Fix this corner case by moving up the cond_resched() check so that it
> will be called every 64 pages unconditionally.
> 
> Fixes: bde5f6bc68db ("kmemleak: add scheduling point to kmemleak_scan()")
> Signed-off-by: Waiman Long <longman@redhat.com>

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


      reply	other threads:[~2023-08-27 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 16:49 Waiman Long
2023-08-27 13:07 ` 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=ZOtKq99/aZCNkav6@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.com \
    --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