Messages in this thread | | | From | Rick Bressler <> | Subject | Re: [PATCH] scheduler hints | Date | Wed, 5 Jun 2002 18:14:40 -0700 (PDT) |
| |
> We don't need a scheduler "hint" for this, though. A big loud command > "bind me to this processor!" would do fine, and in 2.5 we have that: > > just have one of the tasks do: > > sched_setaffinity(0, sizeof(unsigned long), 1); > sched_setaffinity(other_guys_pid, sizeof(unsigned long), 1); > > and both will be affined to CPU 1.
I think that in some ways they were trying to simplify the code. It is a bit more complicated to do well from user space. You're talking dozens to thousands of process pairs, and maybe dozens of CPU's. I think the idea was that the scheduler has a better idea of what CPU's are least busy, where to put the processes and indeed should migrate tasks as necessary. I just does it in pairs. Keep em together is the idea, rather than keep them in any one specific place, thus the hint.
I note that Gerrit replied also and as I recall he is one of those ex Sequent guys who really knows this stuff, so I'll bow out in favor of the experts. :-)
-- +--------------------------------------------+ Rick Bressler |Mushrooms and other fungi have several | G-4781 (425)342-1554 |important roles in nature. They help things| Pager 1-800-946-4646 |grow, they are a source of food, they | Pin: 1700898 |decompose organic matter and they | bressler@mushroom.ca.boeing.com |infect, debilitate and kill organisms. | Linux: Because a PC is a +--------------------------------------------+ terrible thing to waste. - 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/
| |