linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Marco Elver <elver@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: David Rientjes <rientjes@google.com>,
	Christoph Lameter <cl@linux.com>,
	 Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Pekka Enberg <penberg@kernel.org>,
	 Roman Gushchin <roman.gushchin@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org,  patches@lists.linux.dev,
	linux-kernel@vger.kernel.org,  Oliver Glitta <glittao@gmail.com>,
	Faiyaz Mohammed <faiyazm@codeaurora.org>,
	 Mike Rapoport <rppt@linux.ibm.com>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	 Imran Khan <imran.f.khan@oracle.com>
Subject: Re: [PATCH v2 1/6] lib/stackdepot: allow requesting early initialization dynamically
Date: Wed, 2 Mar 2022 19:15:32 +0100	[thread overview]
Message-ID: <CANpmjNO-HpLE43+jQeBC=YxMHDkaHjKrrBg1sUeCMQKPv3kE_w@mail.gmail.com> (raw)
In-Reply-To: <4a1c1470-30d0-2a21-0c03-64ffa2fc54c5@suse.cz>

On Wed, 2 Mar 2022 at 19:02, Vlastimil Babka <vbabka@suse.cz> wrote:
[...]
> > Similarly, for stack_depot_want_early_init, where instead you could
> > simply provide stack_depot_want_early_init() as a function, which simply
> > sets a boolean __stack_depot_want_early_init. If !STACKDEPOT, it'll also
> > just be a no-op function.
>
> Yeah, makes sense. I guess I have patch 3/6 wrong now anyway as with
> !STACKDEPOT it should fail linking due to missing stack_depot_want_early_init...

Right. It probably still worked because the compiler likely optimizes
out the dead call, but you never know...

> >> +bool stack_depot_want_early_init = false;
> >> +
> >
> > This can be __initdata, right?
>
> I initially thought so too, but in include/linux/init.h found
>  * Don't forget to initialize data not at file scope, i.e. within a function,
>  * as gcc otherwise puts the data into the bss section and not into the init
>  * section.
> But maybe that's just outdated as everyone seems to init them at file scope.

I think that comment is just about static variables inside functions?
Here it's at file scope, so that caveat shouldn't apply. As an aside,
you could omit '= false' because it'd zero-init by default.

Thanks,
-- Marco


  reply	other threads:[~2022-03-02 18:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 17:31 [PATCH v2 0/6] SLUB debugfs improvements based on stackdepot Vlastimil Babka
2022-03-02 17:31 ` [PATCH v2 1/6] lib/stackdepot: allow requesting early initialization dynamically Vlastimil Babka
2022-03-02 17:47   ` Marco Elver
2022-03-02 18:02     ` Vlastimil Babka
2022-03-02 18:15       ` Marco Elver [this message]
2022-03-02 18:01   ` Mike Rapoport
2022-03-03 19:19   ` [PATCH v3r0 " Vlastimil Babka
2022-03-04  9:18     ` Marco Elver
2022-03-04 10:47     ` Hyeonggon Yoo
2022-03-04 11:02     ` Mike Rapoport
2022-03-02 17:31 ` [PATCH v2 2/6] mm/slub: move struct track init out of set_track() Vlastimil Babka
2022-03-02 17:31 ` [PATCH v2 3/6] mm/slub: use stackdepot to save stack trace in objects Vlastimil Babka
2022-03-04 11:25   ` Hyeonggon Yoo
2022-03-04 12:10     ` Vlastimil Babka
2022-03-02 17:31 ` [PATCH v2 4/6] mm/slub: distinguish and print stack traces in debugfs files Vlastimil Babka
2022-03-02 17:31 ` [PATCH v2 5/6] mm/slub: sort debugfs output by frequency of stack traces Vlastimil Babka
2022-03-02 17:31 ` [PATCH v2 6/6] slab, documentation: add description of debugfs files for SLUB caches Vlastimil Babka
2022-03-03  8:14   ` Hyeonggon Yoo
2022-03-03  9:33   ` Mike Rapoport

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='CANpmjNO-HpLE43+jQeBC=YxMHDkaHjKrrBg1sUeCMQKPv3kE_w@mail.gmail.com' \
    --to=elver@google.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=faiyazm@codeaurora.org \
    --cc=glittao@gmail.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=imran.f.khan@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=patches@lists.linux.dev \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@linux.ibm.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