linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Faiyaz Mohammed <faiyazm@codeaurora.org>,
	cl@linux.com, penberg@kernel.org, rientjes@google.com,
	iamjoonsoo.kim@lge.com, akpm@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org, greg@kroah.com,
	glittao@gmail.com
Cc: vinmenon@codeaurora.org
Subject: Re: [PATCH v7] mm: slub: move sysfs slab alloc/free interfaces to debugfs
Date: Mon, 31 May 2021 11:55:02 +0200	[thread overview]
Message-ID: <dca0fe16-18ed-fa6f-6062-2659e061c26b@suse.cz> (raw)
In-Reply-To: <b43fad97-5f40-c94a-7cb4-9a31edd6668f@codeaurora.org>

On 5/31/21 8:55 AM, Faiyaz Mohammed wrote:

>> I don't see any of the symlinks under /sys/kernel/debug/slab/, so I think the
>> aliases handling code is wrong, and I can see at least two reasons why it could be:
>> 
> 
> I think I missed one thing, when CONFIG_SLUB_DEBUG_ON enable or
> slub_debug is pass through command line __kmem_cache_alias() will return
> null, so no symlinks will be created even if CONFIG_SLAB_MERGE_DEFAULT
> is enable and to store user data we need to enable CONFIG_SLUB_DEBUG_ON
> or pass slub_debug through command line.

So you're saying that caches with SLAB_STORE_USER can never be aliases as the
merging logic will prevent merging with any debug flag, including STORE_USER. So
if we ignore aliases, it means we will not create the debugfs files for caches,
where opening the files would just return error, so we don't lose anything by
not creating the files in the first place.

In that case, for consistency I would recommend to skip debugfs creation for all
caches without SLAB_STORE_USER (even if the caches are not an alias). I think we
can make this decision now as it's a whole new debugfs subtree so we don't break
any pre-existing code.


  reply	other threads:[~2021-05-31  9:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  7:38 [PATCH v7] mm: slub: move sysfs slab alloc/free interfaces to debugfs Faiyaz Mohammed
2021-05-25  7:53 ` Greg KH
2021-05-25  8:57   ` Faiyaz Mohammed
2021-05-25 11:54     ` Greg KH
2021-05-26 11:03       ` Vlastimil Babka
2021-05-26 15:06         ` Faiyaz Mohammed
2021-05-26 15:07           ` Vlastimil Babka
2021-05-26 11:38 ` Vlastimil Babka
2021-05-26 11:48   ` Greg KH
2021-05-26 12:13     ` Vlastimil Babka
2021-05-31  7:11       ` Faiyaz Mohammed
2021-05-31  8:19         ` Vlastimil Babka
2021-05-31  9:50           ` Faiyaz Mohammed
2021-05-31  6:55   ` Faiyaz Mohammed
2021-05-31  9:55     ` Vlastimil Babka [this message]
2021-05-31 11:07       ` Faiyaz Mohammed

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=dca0fe16-18ed-fa6f-6062-2659e061c26b@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=faiyazm@codeaurora.org \
    --cc=glittao@gmail.com \
    --cc=greg@kroah.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=vinmenon@codeaurora.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;
as well as URLs for NNTP newsgroup(s).