linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	 David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	linux-mm@kvack.org,  Jinjie Ruan <ruanjinjie@huawei.com>,
	Liu Shixin <liushixin2@huawei.com>,
	 Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH v1] mm/slab: Allow cache creation to proceed even if sysfs registration fails
Date: Sat, 2 Nov 2024 19:16:44 +0900	[thread overview]
Message-ID: <CAB=+i9QHQO9k2NpA2jtwu8PvjhnK5+HzDTWQOwH20KPKCnkiSA@mail.gmail.com> (raw)
In-Reply-To: <CAB=+i9Qyenb56-RXLn2c8Gs60APVr1LTG=xR+N1XDh_ZF7CgDw@mail.gmail.com>

On Sat, Nov 2, 2024 at 7:07 PM Hyeonggon Yoo <42.hyeyoo@gmail.com> wrote:
>
> On Sat, Nov 2, 2024 at 5:50 PM Vlastimil Babka <vbabka@suse.cz> wrote:
> >
> > On 11/2/24 8:18 AM, Hyeonggon Yoo wrote:
> > >>
> > >> Also here, and simplified to "if (sysfs_slab_add(s)) ... " to avoid dealing
> > >> with err.
> > >
> > > Oh no. err is initialized to -EINVAL, so that will not work as intended.
> > > It is causing the following list corruption.
> >
> > Ooops, right, thanks a lot. Wrongly assumed that a test boot in
> > virtme-ng would catch silly mistakes like that. Looks like all caches
> > were created with SLAB_STATE < FULL.
> >
> > Fixed by setting err = 0 before trying sysfs add.
>
> Thanks!
>
> Hmm... by the way, why doesn't SLUB update 'err' in the event of an error in
> init_cache_random_seq(), init_kmem_cache_nodes(), or alloc_kmem_cache_cpus()?
> I may be missing something, but it doesn't seem to handle these errors
> properly to me...

Oh, it seems like a recent change fc0eac57d08c ("slab: pull kmem_cache_open()
into do_kmem_cache_create()") incorrectly pulled kmem_cache_open()?

Cc-ing Christian Brauner.


  reply	other threads:[~2024-11-02 10:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 13:08 Hyeonggon Yoo
2024-11-01 13:15 ` Hyeonggon Yoo
2024-11-01 13:58   ` Vlastimil Babka
2024-11-02  7:18     ` Hyeonggon Yoo
2024-11-02  8:53       ` Vlastimil Babka
2024-11-02 10:07         ` Hyeonggon Yoo
2024-11-02 10:16           ` Hyeonggon Yoo [this message]
2024-11-02 14:51             ` Hyeonggon Yoo
2024-11-04  9:28               ` Vlastimil Babka

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='CAB=+i9QHQO9k2NpA2jtwu8PvjhnK5+HzDTWQOwH20KPKCnkiSA@mail.gmail.com' \
    --to=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-mm@kvack.org \
    --cc=liushixin2@huawei.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=ruanjinjie@huawei.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox