> I was wondering whether the code I converted was running with preempt
> disabled or not but didn't check. (The very thought of preempt on
> SMP scares me anyway, so I avoid it.)
On a glance, it looked like at least some of them were.
> smp_processor_id() is not preempt-safe either, since the id could
> change before you even get a chance to use the value. How many
> thousands of lines of code remain that were written assuming things
> would not change underneath them in kernel mode?
Code that needs the processor number to remain fixed now uses get_cpu()
and put_cpu() which disable preemption.
> > Maybe put a comment above it like:
>
>
> How about one for the whole kernel?
>
> /**********
> * WARNING: Use preempt at your own risk.
> **********/
No :)
Robert Love
-
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/