Re: Scheduler Bug (set_cpus_allowed)

From: Mike Kravetz (kravetz@us.ibm.com)
Date: Mon Jun 10 2002 - 18:15:59 EST


On Tue, Jun 11, 2002 at 12:35:38AM +0200, Ingo Molnar wrote:
>
> agreed. I removed the _sync code mainly because there was no
> idle_resched() to migrate a task actively, and the migration bits i tried
> were incomplete. But with your above conditional it should cover all the
> practical cases we care about, in an elegant way.
>
> i ported your sync wakeup resurrection patch to 2.5.21 (attached). I did
> some modifications:
>
> - wake_up() needs to check (rq->curr != p) as well, not only !p->array.
>
> - make __wake_up_sync dependent on CONFIG_SMP
>
> - export __wake_up_sync().
>
> (the attached patch includes both the ->frozen change plus the sync wakeup
> resurrection, it's against vanilla 2.5.21.)
>
> appears to work for me just fine (compiles, boots and works under SMP & UP
> alike), and does the trick for bw_pipe and lat_pipe. Comments?
>
> Ingo

Great! Thanks!

You might also consider adding the optimization/fast path to
set_cpus_allowed(). Once again, I don't expect this routine
(or this code path) to be used much, but I just hate to see
us scheudle a migration task to set the cpu field when it is
safe to do it within the routine.

-- 
Mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:19 EST