From: Catalin Marinas <catalin.marinas@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Breno Leitao <leitao@debian.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH 2/2] mm: kmemleak: scan the struct page array in MAX_SCAN_SIZE batches
Date: Wed, 23 Sep 2026 11:47:08 +0100 [thread overview]
Message-ID: <arOuLEZfEqmce4iO@arm.com> (raw)
In-Reply-To: <20260922183921.b30bc1c3ba9443e021910851@linux-foundation.org>
On Tue, Sep 22, 2026 at 06:39:21PM -0700, Andrew Morton wrote:
> On Tue, 22 Sep 2026 10:51:46 +0100 Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> > On Mon, Sep 21, 2026 at 05:30:27AM -0700, Breno Leitao wrote:
> > > scan_zone_pages() scans the struct page array one page per scan_block()
> > > call:
> > >
> > > if (scan_block(page, page + 1, NULL))
> > >
> > > scan_block() takes kmemleak_lock with interrupts disabled for the
> > > duration of the call, so this acquires the lock once per online PFN to
> > > scan a single struct page.
> > >
> > > Gather runs of adjacent eligible struct pages and pass each run to
> > > scan_block() in one call, capped at MAX_SCAN_SIZE.
> > >
> > > The longest kmemleak_lock is now held is MAX_SCAN_SIZE worth of words,
> >
> > Remove an 'is'.
>
> That was actually correct, but it doesn't read well.
Ah, yes, you can read it in a correct way as well ;).
> > Also, MAX_SCAN_SIZE worth of bytes rather than words.
>
> edited, thanks.
>
> How's this?
>
> : The longest kmemleak_lock hold duration is now MAX_SCAN_SIZE worth of
> : bytes. The same bound scan_large_block() already applies to the data
> : sections and the per-CPU areas.
Looks good. Thanks!
--
Catalin
prev parent reply other threads:[~2026-09-23 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 12:30 [PATCH 0/2] mm: kmemleak: batch the struct page scan Breno Leitao
2026-09-21 12:30 ` [PATCH 1/2] mm: kmemleak: move the struct page scan into a helper Breno Leitao
2026-09-22 9:47 ` Catalin Marinas
2026-09-21 12:30 ` [PATCH 2/2] mm: kmemleak: scan the struct page array in MAX_SCAN_SIZE batches Breno Leitao
2026-09-22 9:51 ` Catalin Marinas
2026-09-23 1:39 ` Andrew Morton
2026-09-23 10:47 ` 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=arOuLEZfEqmce4iO@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.