Well, the original poster wasn't using kernel threads, as I understood,
and polling with schedule() has never been a hot idea anyway -- that's
why I have the KHG cover wait queues a little bit...
It sounds like the rule is now:
o You can use schedule() when you just want to possibly give time
to other processes, modulo scheduling policy now in effect. After
all, schedule() didn't always yield in the past; it only yielded if
there was any reason to do so.
o Don't poll with schedule()! It's never been the right thing to
do; that's what wait queues are for. Now this bad idea is unsafe
on SMP boxes.
o If you are writing a kernel thread, then pay attention to how you
have set the scheduling hints for the thread and understand that
they will affect your scheduling (obviously). See sched_yield() for
more information (I haven't seen it so I can't say anything more).
Is that about right?
michaelkjohnson
"Ever wonder why the SAME PEOPLE make up ALL the conspiracy theories?"