1) you have removed one optimization: the old code needed _no_ register
if the spinlock was stored global variable (such as the tasklist_lock),
now you always clobber the %%eax register.
This might increase the register pressure, but I don't know if egcs
actually uses the %%eax register across "asm volatile".
2) the rw spinlock must starve writers, or you risk a lock-up with
interrupts:
CPU1: CPU2:
read_lock(&lock);
write_lock_irq(&lock);
<hardware interrupt>
<within hardware interrupt:>
read_lock(&lock);
; lock-up! write_lock() must release the lock before spinning.
AFAICS, you hold the lock while spinning.
-- Manfred
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/