From: Catalin Marinas <catalin.marinas@arm.com>
To: Waiman Long <longman@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] kmemleak: Avoid RCU stalls when freeing metadata for per-CPU pointers
Date: Wed, 6 Dec 2023 11:31:14 +0000 [thread overview]
Message-ID: <ZXBbgv6is4JdfXs3@arm.com> (raw)
In-Reply-To: <597352bb-6afa-4fa4-a5ee-1f0aa14e61be@redhat.com>
On Fri, Dec 01, 2023 at 05:22:26PM -0500, Waiman Long wrote:
> On 12/1/23 14:08, Catalin Marinas wrote:
> > diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> > index 1eacca03bedd..eb6cdc3e9af2 100644
> > --- a/mm/kmemleak.c
> > +++ b/mm/kmemleak.c
> > @@ -14,17 +14,15 @@
> > * The following locks and mutexes are used by kmemleak:
> > *
> > * - kmemleak_lock (raw_spinlock_t): protects the object_list as well as
> > - * del_state modifications and accesses to the object_tree_root (or
> > - * object_phys_tree_root). The object_list is the main list holding the
> > - * metadata (struct kmemleak_object) for the allocated memory blocks.
> > - * The object_tree_root and object_phys_tree_root are red
> > - * black trees used to look-up metadata based on a pointer to the
> > - * corresponding memory block. The object_phys_tree_root is for objects
> > - * allocated with physical address. The kmemleak_object structures are
> > - * added to the object_list and object_tree_root (or object_phys_tree_root)
> > - * in the create_object() function called from the kmemleak_alloc() (or
> > - * kmemleak_alloc_phys()) callback and removed in delete_object() called from
> > - * the kmemleak_free() callback
> > + * del_state modifications and accesses to the object trees
> > + * (object_tree_root, object_phys_tree_root, object_percpu_tree_root). The
> > + * object_list is the main list holding the metadata (struct
> > + * kmemleak_object) for the allocated memory blocks. The object trees are
> > + * red black trees used to look-up metadata based on a pointer to the
> > + * corresponding memory block. The kmemleak_object structures are added to
> > + * the object_list and the object tree root in the create_object() function
> > + * called from the kmemleak_alloc() (or kmemleak_alloc_phys()) callback and
> > + * removed in delete_object() called from the kmemleak_free() callback
>
> Just a minor nit. For completeness, should we mention
> kmemleak_alloc_percpu() and kmemleak_free_percpu() here?
Yeah, I was too lazy. I added some shell-style patterns and repost a v2.
> Anyway, I won't mind if you want to keep it as it is.
>
> Reviewed-by: Waiman Long <longman@redhat.com>
Thanks.
--
Catalin
next prev parent reply other threads:[~2023-12-06 11:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 19:08 Catalin Marinas
2023-12-01 22:22 ` Waiman Long
2023-12-06 11:31 ` Catalin Marinas [this message]
2023-12-02 7:50 ` Hillf Danton
2023-12-06 11:22 ` Catalin Marinas
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=ZXBbgv6is4JdfXs3@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 \
/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