linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Liam R. Howlett" <Liam.Howlett@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>,
	linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org,
	linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [PATCH 1/2] maple_tree: add test to replicate low memory race conditions
Date: Thu, 8 Aug 2024 15:24:05 -0400	[thread overview]
Message-ID: <oqan7j6nqyu4aej2crmio4uvukmrohinbnsnwcemk3l3z76z5w@kva7whwrns3m> (raw)
In-Reply-To: <ZrUZPWZVbA-2OBaV@casper.infradead.org>

* Matthew Wilcox <willy@infradead.org> [240808 15:15]:
> On Thu, Aug 08, 2024 at 12:29:59PM -0400, Sidhartha Kumar wrote:
> > diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> > index aa3a5df15b8e..65fba37ef999 100644
> > --- a/lib/maple_tree.c
> > +++ b/lib/maple_tree.c
> > @@ -6997,6 +6997,18 @@ void mt_set_non_kernel(unsigned int val)
> >  	kmem_cache_set_non_kernel(maple_node_cache, val);
> >  }
> >  
> > +extern void kmem_cache_set_callback(struct kmem_cache *cachep, void (*callback)(void *));
> > +void mt_set_callback(void (*callback)(void *))
> > +{
> > +	kmem_cache_set_callback(maple_node_cache, callback);
> > +}
> > +
> > +extern void kmem_cache_set_private(struct kmem_cache *cachep, void *private);
> > +void mt_set_private(void *private)
> > +{
> > +	kmem_cache_set_private(maple_node_cache, private);
> > +}
> > +
> >  extern unsigned long kmem_cache_get_alloc(struct kmem_cache *);
> >  unsigned long mt_get_alloc_size(void)
> >  {
> 
> This should surely not be in lib/maple_tree.c ...
> 

It has to be as it uses the kmem_cache maple_node_cache reference.

It is located in an ifndef __KERNEL__ and an ifdef
CONFIG_DEBUG_MAPLE_TREE, so it won't be in any kernel builds.


      reply	other threads:[~2024-08-08 19:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 16:29 Sidhartha Kumar
2024-08-08 16:30 ` [PATCH 2/2] maple_tree: reset mas->index and mas->last on write retries Sidhartha Kumar
2024-08-08 17:31   ` Liam R. Howlett
2024-08-08 17:22 ` [PATCH 1/2] maple_tree: add test to replicate low memory race conditions Liam R. Howlett
2024-08-08 19:15 ` Matthew Wilcox
2024-08-08 19:24   ` Liam R. Howlett [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=oqan7j6nqyu4aej2crmio4uvukmrohinbnsnwcemk3l3z76z5w@kva7whwrns3m \
    --to=liam.howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    --cc=sidhartha.kumar@oracle.com \
    --cc=willy@infradead.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