From: Andrew Morton <akpm@linux-foundation.org>
To: Weilin Tong <tongweilin@linux.alibaba.com>
Cc: catalin.marinas@arm.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] mm: kmemleak: avoid long RCU read-side sections in reports
Date: Mon, 9 Nov 2026 21:17:09 -0800 [thread overview]
Message-ID: <20261109211709.133122f9f10091f06c4acbc1@linux-foundation.org> (raw)
In-Reply-To: <cover.1793871596.git.tongweilin@linux.alibaba.com>
On Thu, 5 Nov 2026 17:52:48 +0800 Weilin Tong <tongweilin@linux.alibaba.com> wrote:
> Reading a kmemleak report can traverse all tracked objects in one
> RCU read-side section and cause a stall.
>
> Serialize disable-time cleanup with clear operations and report readers,
> then use kmemleak_cond_resched() in both report traversal loops to let RCU
> progress safely during long reads.
Thanks. Has this been demonstrated? Are there real-world reports? Or
is this a theoretical thing from (LLM assisted) code inspection?
Please do share such details, they matter.
In [2/2], *pos does not advance while kmemleak_seq_next() skips objects
whose get_object() fails. If *pos isn't aligned to the 256 boundary
and preemption clears need_resched(), a long deleted chain gets no
periodic RCU break. Seems the code could tighten and simplify the "once
per 256 operations" logic?
prev parent reply other threads:[~2026-11-10 5:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 9:52 Weilin Tong
2026-11-05 9:52 ` [PATCH 1/2] mm: kmemleak: serialize disable-time cleanup Weilin Tong
2026-11-05 9:52 ` [PATCH 2/2] mm: kmemleak: reschedule while reading reports Weilin Tong
2026-11-10 5:17 ` Andrew Morton [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=20261109211709.133122f9f10091f06c4acbc1@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tongweilin@linux.alibaba.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
all inboxes | Powered by JetHome®