Re: Question from Russells Spinlocks
From: Jeff V. Merkey
Date: Thu Dec 09 2004 - 18:49:53 EST
Anton Altaparmakov wrote:
Your last sentence is incorrect. Spinlocks on 1 CPU machines still need
to disable preemption (assuming preemption is compiled in obviously, if
not then indeed you are right). Otherwise preemption could take place in
the middle of a data manipulation and you would still have the same race
as you described with two cpus working concurrently. Except that with
preemption it is only logical concurrence not actual physical concurrence.
Best regards,
Anton
Anton is correct in his analysis.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/