[PATCH]new_TSC_based_delay_tsc()

2007-11-20 Thread Marin Mitov
Hi all, Please ignore the previous patch with the same subject. It has a bug that can manifest itself in the very exotic case when each do {} while() iteration executes on different cpu leading to potentially infinite loop. This is a patch based on the Ingo's idea/patch to track delay_tsc() migr

[PATCH]new_TSC_based_delay_tsc()

2007-11-18 Thread Marin Mitov
Hi all, This is a patch based on the Ingo's idea/patch to track delay_tsc() migration to another cpu by comparing smp_processor_id(). It is against kernel-2.6.24-rc3. What is different: 1. Using unsigned (instead of long) to unify for i386/x86_64. 2. Minimal preempt_disable/enable() critical se