lkml.org 
[lkml]   [2002]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.40-mm2
Robert Love wrote:
>
> On Sun, 2002-10-06 at 18:07, Andrew Morton wrote:
>
> > > - while (base->running_timer == timer) {
> > > + while (base->running_timer == timer)
> > > cpu_relax();
> > > - preempt_disable();
> > > - preempt_enable();
>
> I am confused as to why Ingo would put these here. He knows very well
> what he is doing... surely he had a reason.
>
> If he intended to force a preemption point here, then the lines needs to
> be reversed. This assumes, of course, preemption is disabled here. But
> I do not think it is.
>
> If he just wanted to check for preemption, we have a
> preempt_check_resched() which does just that (I even think he wrote
> it). Note as long as interrupts are enabled this probably does not
> achieve much anyhow.
>

I think it's a way of doing "cond_resched() if cond_resched() is
a legal thing to do right now".

I'm sure David isn't using preempt though.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [from the cache]
©2003-2011 Jasper Spaans