Disk blocks for long periods

David Woodhouse dwmw2 at infradead.org
Tue Aug 6 08:14:47 EDT 2002


joakim.tjernlund at lumentis.se said:
>  BTW, is it neccesary to use spin_lock_bh()? Can we not get away with
> just spin_lock()? I am not very good at locking, but I think xxx_bh is
> only needed when interrupts can can execute the locked code and
> currently there are no interrupts in this code path(I think).

> Is it not true that xxx_bh() also disables interrupts? If so, there
> must be rather long periods with interrupts turned off in
> cfi_cmdset_xxxx.c?

spin_lock_bh() should not disable interrupts, only bottom-halves. It was 
used to protect against timers, because we intend(ed) to have the erase 
completion done from a timer. At the moment there's no real need to use 
anything but spin_lock().


--
dwmw2






More information about the linux-mtd mailing list