Suparna Bhattacharya <[EMAIL PROTECTED]> writes: > Any sense of how costly it is to use spin_lock_irq's vs spin_lock > (across different architectures) ? Isn't rwsem used very widely ?
On P4s cli/sti is quite costly, let's says 100+ cycles. That is mostly because it synchronizes the CPU partly. The Intel tables say 26/36 cycles latency, but in practice it seems to take longer because of the synchronization. I would assume this is the worst case, everywhere else it should be cheaper (except perhaps in some virtualized environments) On P-M and AMD K7/K8 it is only a few cycles difference. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

