All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	RCU <rcu@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH v1 1/2] kunit, slub: Add test_kfree_rcu_wq_destroy use case
Date: Fri, 28 Feb 2025 17:27:06 +0100	[thread overview]
Message-ID: <Z8Hj2sGL8Cgc2TuX@pc636> (raw)
In-Reply-To: <b97fdb00-6367-4eec-87cd-47f6765fd2cc@suse.cz>

On Fri, Feb 28, 2025 at 04:49:24PM +0100, Vlastimil Babka wrote:
> On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote:
> > Add a test_kfree_rcu_wq_destroy test to verify a kmem_cache_destroy()
> > from a workqueue context. The problem is that, before destroying any
> > cache the kvfree_rcu_barrier() is invoked to guarantee that in-flight
> > freed objects are flushed.
> > 
> > The _barrier() function queues and flushes its own internal workers
> > which might conflict with a workqueue type a kmem-cache gets destroyed
> > from.
> > 
> > One example is when a WQ_MEM_RECLAIM workqueue is flushing !WQ_MEM_RECLAIM
> > events which leads to a kernel splat. See the check_flush_dependency() in
> > the workqueue.c file.
> > 
> > If this test does not emits any kernel warning, it is passed.
> 
> Well the workqueue warning doesn't seem to make the test fail. But someone
> will notice the warning, so that should be enough. We can't instrument
> warnings in other subsystem's code for slub kunit context anyway. It would
> have to be a generic kunit's hook for all warns.
> 
I agree.

> > Reviewed-by: Keith Busch <kbusch@kernel.org>
> > Co-developed-by: Vlastimil Babka <vbabka@suse.cz>
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> 
> Pushed to slab/for-next, thanks.
>
Thanks!

--
Uladzislau Rezki

      reply	other threads:[~2025-02-28 16:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 12:13 [PATCH v1 1/2] kunit, slub: Add test_kfree_rcu_wq_destroy use case Uladzislau Rezki (Sony)
2025-02-28 12:13 ` [PATCH v1 2/2] mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq Uladzislau Rezki (Sony)
2025-02-28 14:42   ` Vlastimil Babka
2025-02-28 16:25     ` Uladzislau Rezki
2025-03-03 16:08   ` Joel Fernandes
2025-03-04 14:55     ` Paul E. McKenney
2025-03-06 18:26       ` Joel Fernandes
2025-02-28 15:49 ` [PATCH v1 1/2] kunit, slub: Add test_kfree_rcu_wq_destroy use case Vlastimil Babka
2025-02-28 16:27   ` Uladzislau Rezki [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=Z8Hj2sGL8Cgc2TuX@pc636 \
    --to=urezki@gmail.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleksiy.avramchenko@sony.com \
    --cc=penberg@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    /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.