From: Catalin Marinas <catalin.marinas@arm.com>
To: patrick wang <patrick.wang.shcn@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
dennis@kernel.org, tj@kernel.org, cl@linux.com,
"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: percpu: use kmemleak_ignore_phys() instead of kmemleak_free()
Date: Tue, 12 Jul 2022 11:59:48 +0100 [thread overview]
Message-ID: <Ys1UJMYa7UW0+Bt0@arm.com> (raw)
In-Reply-To: <CAGcnep_1QSdkNYqvgYC+ec2XVmqvG6rjZud-NfG22f_wQrJHKQ@mail.gmail.com>
On Wed, Jul 06, 2022 at 10:44:11PM +0800, patrick wang wrote:
> On Wed, Jul 6, 2022 at 5:20 AM Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > On Tue, 5 Jul 2022 19:31:58 +0800 Patrick Wang <patrick.wang.shcn@gmail.com> wrote:
> >
> > > Kmemleak recently added a rbtree to store the objects
> > > allocted with physical address. Those objects can't be
> > > freed with kmemleak_free(). Use kmemleak_ignore_phys()
> > > instead of kmemleak_free() for those objects.
> >
> > Thanks. What are the user-visible runtime effects of this?
>
> According to the comments, percpu allocations are tracked
> by kmemleak separately. Kmemleak_free() was used to avoid
> the unnecessary tracking. If kmemleak_free() fails, those
> objects would be scanned by kmemleak, which is unnecessary
> but shouldn't lead to other effects.
>
> I didn't observe any anomaly without this commit on riscv
> and arm64.
What could happen is an increased rate of false negatives as it scans
more than necessary.
> > And are we able to identify a commit for the Fixes: line?
>
> 0c24e061196c (mm: kmemleak: add rbtree and store physical
> address for objects allocated with PA)
> Current in mm-stable.
I think we could add a Fixes line for the above. For the patch:
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
prev parent reply other threads:[~2022-07-12 10:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 11:31 Patrick Wang
2022-07-05 21:20 ` Andrew Morton
2022-07-06 14:44 ` patrick wang
2022-07-12 10:59 ` 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=Ys1UJMYa7UW0+Bt0@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=dennis@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=patrick.wang.shcn@gmail.com \
--cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox