From: Oleg Nesterov <oleg@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: arjan@infradead.org, jeremy@goop.org, mschmidt@redhat.com,
mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
tj@kernel.org, tglx@linutronix.de,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-tip-commits@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: [PATCH 0/1] kthreads: simplify !kthreadd_task logic, kill kthreadd_task_init_done
Date: Tue, 1 Sep 2009 18:52:35 +0200 [thread overview]
Message-ID: <20090901165235.GA9105@redhat.com> (raw)
In-Reply-To: <20090901145526.GA31317@redhat.com>
On 09/01, Oleg Nesterov wrote:
>
> On 09/01, Ingo Molnar wrote:
> >
> > * Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > > On 09/01, Ingo Molnar wrote:
> > > >
> > > > * Oleg Nesterov <oleg@redhat.com> wrote:
> > > >
> > > > > Yes, this should work. But I _think_ we can make the better fix...
> > > > >
> > > > > I'll try to make the patch soon. Afaics we don't need
> > > > > kthreadd_task_init_done.
> > > >
> > > > ok.
> > >
> > > Just in case, the patch is ready. [...]
> >
> > yes - that's roughly the cleanup i referred to in the commit log.
> >
> > way too late for -rc8 though - the minimal fix i did _might_ be
> > eligible.
> >
> > agreed?
>
> Agreed. Then I will sent the patch on top of this change.
OK, I am sending the patch on top of your fix. Not sure how to really
test it, but at least the kernel works when I apply the debugging patch
below on top.
Oleg.
--- WAIT/init/main.c~DBG 2009-09-01 15:49:36.000000000 +0200
+++ WAIT/init/main.c 2009-09-01 17:53:28.000000000 +0200
@@ -455,7 +455,6 @@ static noinline void __init_refok rest_i
{
kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
numa_default_policy();
- kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
unlock_kernel();
/*
@@ -466,6 +465,12 @@ static noinline void __init_refok rest_i
rcu_scheduler_starting();
preempt_enable_no_resched();
schedule();
+
+ printk(KERN_INFO "XXX rest_init - sleeeeep\n");
+// schedule_timeout_interruptible(HZ);
+ kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
+ printk(KERN_INFO "XXX rest_init - kthreadd started\n");
+
preempt_disable();
/* Call into cpu_idle with preempt disabled */
@@ -877,10 +882,18 @@ static noinline int init_post(void)
panic("No init found. Try passing init= option to kernel.");
}
+int ktfunc(void *arg)
+{
+ printk(KERN_INFO "XXX ktfunc - alive!\n");
+ return 0;
+}
+
static int __init kernel_init(void * unused)
{
lock_kernel();
+ printk(KERN_INFO "XXX kernel_init - call kthread_run, kthreadd=%p\n", kthreadd_task);
+ kthread_run(ktfunc, NULL, "xxx");
/*
* init can allocate pages on any node
*/
next prev parent reply other threads:[~2009-09-01 16:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-29 16:27 [PATCH] x86: detect stack protector for i386 builds on x86_64 Michal Schmidt
2009-08-30 13:39 ` Américo Wang
2009-08-30 18:43 ` [tip:x86/asm] x86: Detect " tip-bot for Michal Schmidt
2009-09-01 10:03 ` Ingo Molnar
2009-09-01 11:39 ` [PATCH] kthreads: Fix startup synchronization boot crash Ingo Molnar
2009-09-01 13:04 ` Oleg Nesterov
2009-09-01 13:14 ` Ingo Molnar
2009-09-01 13:37 ` Oleg Nesterov
2009-09-01 13:59 ` Ingo Molnar
2009-09-01 14:55 ` Oleg Nesterov
2009-09-01 15:54 ` Ingo Molnar
2009-09-01 16:00 ` Oleg Nesterov
2009-09-02 13:06 ` Ingo Molnar
2009-09-01 16:52 ` Oleg Nesterov [this message]
2009-09-01 16:53 ` [PATCH 1/1] kthreads: simplify !kthreadd_task logic, kill kthreadd_task_init_done Oleg Nesterov
2009-09-01 23:22 ` [PATCH 0/1] " Eric W. Biederman
2009-09-02 9:13 ` Oleg Nesterov
2009-09-04 7:37 ` Ingo Molnar
2009-09-18 16:32 ` Wu Fei
2009-09-18 18:54 ` Oleg Nesterov
2009-09-18 19:17 ` Linus Torvalds
2009-09-18 21:12 ` Oleg Nesterov
2009-09-18 21:15 ` Oleg Nesterov
2009-09-18 22:06 ` Linus Torvalds
2009-09-18 23:11 ` Eric W. Biederman
2009-09-18 23:22 ` Oleg Nesterov
2009-09-18 23:38 ` Linus Torvalds
2009-09-01 15:08 ` [PATCH] kthreads: Fix startup synchronization boot crash Américo Wang
2009-09-01 15:19 ` Oleg Nesterov
2009-08-31 6:21 ` [PATCH] x86: detect stack protector for i386 builds on x86_64 Tejun Heo
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=20090901165235.GA9105@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=mschmidt@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.