Hi Jes, I read through your acenic driver and noticed that you replaced spinlocks with bitops. Is that a good idea? I always avoid bitops and replace them with spinlocks: * On uniprocessor they are obviously slower. * on SMP i386 spin_lock() / spin_unlock() is faster than test_and_set_bit()/clear_bit(): the spinlock operations have a direction, and thus no memory barrier is required in spin_unlock, Intel's default memory ordering is sufficient. clear_bit() doesn't know that it will be used to end a protected area, thus it needs a full memory barrier. * on ia64 spinlocks are probably faster, and it seems that clear_bit() instead of spin_unlock() might even cause races: spin_unlock() needs a 'release' memory barrier, but clear_bit() contains an 'acquire' memory barrier. I only see 2 advantages for bitops: * you can avoid disabling local interrupts in hard_tx_xmit() or other bottom half handlers, but often you only need the disabled interrupts for a few instructions. * you won't spin - but spinning should be rare, or you can use spin_trylock(). -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
- Re: [PATCH] starfire reads irq before pci_enable_device. Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_enable_devic... Jeff Garzik
- Re: [PATCH] starfire reads irq before pci_enable_d... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_enab... Manfred Spraul
- Re: [PATCH] starfire reads irq before pci_... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_... Jes Sorensen
- Re: [PATCH] starfire reads irq before pci_... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_... Jes Sorensen
- Re: [PATCH] starfire reads irq before pci_... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_... Manfred Spraul
- Re: [PATCH] starfire reads irq before pci_enab... Jeff Garzik
- Re: [PATCH] starfire reads irq before pci_... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_... Jeff Garzik
- Re: [PATCH] starfire reads irq before pci_... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_... Jeff Garzik
- Re: [PATCH] starfire reads irq before pci_... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_... Jeff Garzik
- Re: [PATCH] starfire reads irq before pci_enable_d... Donald Becker
- Re: [PATCH] starfire reads irq before pci_enab... Ion Badulescu
- Re: [PATCH] starfire reads irq before pci_... Ion Badulescu