linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Rongwei Wang <rongwei.wang@linux.alibaba.com>,
	Christoph Lameter <cl@linux.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	David Rientjes <rientjes@google.com>,
	Pekka Enberg <penberg@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	linux-mm@kvack.org, Feng Tang <feng.tang@intel.com>
Subject: Re: [PATCH] mm, slub: restrict sysfs validation to debug caches and make it safe
Date: Thu, 11 Aug 2022 10:42:57 +0200	[thread overview]
Message-ID: <849041c0-b5b8-5240-2526-bd88782c87ae@suse.cz> (raw)
In-Reply-To: <YvSnXqVIxSD1+xIL@ip-172-31-24-42.ap-northeast-1.compute.internal>

On 8/11/22 08:53, Hyeonggon Yoo wrote:
> 
> I started to wonder...
> 
> Do we need slab_lock() after this patch for debugging caches?
> 
> if SLUB never takes a slab from partial list (unless moving to another list or freeing it),
> and if you must acquire list_lock before accessing (to alloc/free objects) per-node partial list,
> Why do we need it?

Yeah, looks like we shouldn't need it anymore as n->list_lock will cover
everything now. Great observation!

> Of course, it is still needed for ARCHs that does not support
> cmpxchg_double().
> 
> But as code for debugging caches is separated after this patch,
> maybe we can simply drop slab_lock() in:
> 	- alloc_debug_processing()
> 	- free_debug_processing()
> 	- alloc_single_from_{new_slab,partial}()
> 	- validate_slab()

list_slab_objects() too, with some care for the locking in get_map().

> And also relevant comments.

As it's becoming too large, I will split this to more patches. Thanks!




      reply	other threads:[~2022-08-11  8:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 14:00 Vlastimil Babka
2022-08-11  6:53 ` Hyeonggon Yoo
2022-08-11  8:42   ` Vlastimil Babka [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=849041c0-b5b8-5240-2526-bd88782c87ae@suse.cz \
    --to=vbabka@suse.cz \
    --cc=42.hyeyoo@gmail.com \
    --cc=cl@linux.com \
    --cc=feng.tang@intel.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rongwei.wang@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