[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090901165235.GA9105@redhat.com>
Date: Tue, 1 Sep 2009 18:52:35 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: arjan@...radead.org, jeremy@...p.org, mschmidt@...hat.com,
mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
tj@...nel.org, tglx@...utronix.de,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-tip-commits@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Rusty Russell <rusty@...tcorp.com.au>
Subject: [PATCH 0/1] kthreads: simplify !kthreadd_task logic, kill
kthreadd_task_init_done
On 09/01, Oleg Nesterov wrote:
>
> On 09/01, Ingo Molnar wrote:
> >
> > * Oleg Nesterov <oleg@...hat.com> wrote:
> >
> > > On 09/01, Ingo Molnar wrote:
> > > >
> > > > * Oleg Nesterov <oleg@...hat.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
*/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists