[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1184446418.5284.86.camel@lappy>
Date: Sat, 14 Jul 2007 22:53:38 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Steven Rostedt <rostedt@...dmis.org>,
Christoph Lameter <clameter@....com>
Subject: Re: [PATCH -rt 2/5] Thread Migration Preemption - v2
On Sun, 2007-07-15 at 00:48 +0400, Oleg Nesterov wrote:
> On 07/14, Peter Zijlstra wrote:
>
> > --- linux-2.6.orig/kernel/sched.c
> > +++ linux-2.6/kernel/sched.c
> > @@ -288,6 +288,7 @@ struct rq {
> >
> > struct task_struct *migration_thread;
> > struct list_head migration_queue;
> > + struct list_head delayed_migration_queue;
> > #endif
>
> I think this could be simplified a bit.
>
> delayed_migration_queue can be a local variable in migration_thread(), then
>
> > #ifdef CONFIG_SCHEDSTATS
> > @@ -5623,6 +5624,11 @@ static int migration_thread(void *data)
> > head = &rq->migration_queue;
> >
> > if (list_empty(head)) {
> > + /*
> > + * we got a wakeup, give the delayed list another shot.
> > + */
> > + if (current->state != TASK_INTERRUPTIBLE)
> > + list_splice(&rq->delayed_migration_queue, head);
>
> No need to check TASK_INTERRUPTIBLE, just do list_splice() unconditionally and
> call schedule().
Yes, I got my head in a twist on that one. You are quite right!
-
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