From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Mathieu Desnoyers" <compudj@krystal.dyndns.org>
Cc: "Eduard - Gabriel Munteanu" <eduard.munteanu@linux360.ro>,
tzanussi@gmail.com, linux-kernel@vger.kernel.org,
penberg@cs.helsinki.fi, akpm@linux-foundation.org,
torvalds@linux-foundation.org
Subject: Re: [PATCH 2/3] Better interface for hooking early initcalls.
Date: Tue, 17 Jun 2008 16:43:25 +0200 [thread overview]
Message-ID: <19f34abd0806170743v274b23a7m85340bccfe9eaf36@mail.gmail.com> (raw)
In-Reply-To: <20080617140742.GD10316@Krystal>
On Tue, Jun 17, 2008 at 4:07 PM, Mathieu Desnoyers
<compudj@krystal.dyndns.org> wrote:
> * Eduard - Gabriel Munteanu (eduard.munteanu@linux360.ro) wrote:
>> Added early initcall (pre-SMP) support, using an identical interface to
>> that of regular initcalls. Functions called from do_pre_smp_initcalls()
>> could be converted to use this cleaner interface.
>>
>> This is required by CPU hotplug, because early users have to register
>> notifiers before going SMP. One such CPU hotplug user is the relay
>> interface with buffer-only channels, which needs to register such a
>> notifier, to be usable in early code. This in turn is used by kmemtrace.
>>
>
> I am not sure it's worth it trying to define a generic "early" initcall,
> since definition of "how early it is" may change with time.
>
> Currently, it's earlier than SMP init, but later on, it could become
> earlier than mm init. If there are only few users of this, and given
> that they must be designed "knowing" how early they are initialized wrt
> other subsystems, I think it would make sense to call them directly from
> the init code without putting them in a "early initcall" category.
If this existed already, I'd use it for kmemcheck. We need to hook
into what happens just before SMP is initialized in order to set
maxcpus = 1 depending on some kernel parameter. Right now it's called
directly from do_pre_smp_initcalls():
@@ -779,6 +780,7 @@ static void __init do_pre_smp_initcalls(void)
{
extern int spawn_ksoftirqd(void);
+ kmemcheck_init();
migration_init();
spawn_ksoftirqd();
if (!nosoftlockup)
With proposed patch, we wouldn't have to touch this file at all, so
for what it's worth, consider it acked by me.
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
next prev parent reply other threads:[~2008-06-17 14:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-15 15:05 Eduard - Gabriel Munteanu
2008-06-17 14:07 ` Mathieu Desnoyers
2008-06-17 14:26 ` Eduard - Gabriel Munteanu
2008-06-17 14:43 ` Vegard Nossum [this message]
2008-06-21 14:10 Eduard - Gabriel Munteanu
2008-06-22 19:22 ` Pekka Enberg
2008-06-22 20:38 ` Eduard - Gabriel Munteanu
2008-06-22 20:43 ` Vegard Nossum
2008-06-22 20:45 ` Pekka Enberg
2008-06-22 21:05 ` Eduard - Gabriel Munteanu
2008-06-22 21:01 ` Eduard - Gabriel Munteanu
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=19f34abd0806170743v274b23a7m85340bccfe9eaf36@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=compudj@krystal.dyndns.org \
--cc=eduard.munteanu@linux360.ro \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=torvalds@linux-foundation.org \
--cc=tzanussi@gmail.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
all inboxes | Powered by JetHome®