Skip to contentSkip to conversation

spin_lock_irq() in handle_stripe()

DISCUSSION Alex Tomas 2 participants 2 messages May 22, 2006 MD RAID

lore
Share & tools
lore

Alex Tomas

author
#0 lore raw

Good day Neil, all

if I understand right, we disable irqs in handle_stripe() just because of using device_lock which can be grabbed from interrupt context (_end_io functions). can we replace it by a new separate spinlock and don't block interrupts in handle_stripe() + add_stripe_bio() ?

thanks, Alex

#1 lore raw
Quoted 9 lines · On Monday May 22, [email protected] wrote:

Good day Neil, all

if I understand right, we disable irqs in handle_stripe() just because of using device_lock which can be grabbed from interrupt context (_end_io functions). can we replace it by a new separate spinlock and don't block interrupts in handle_stripe() + add_stripe_bio() ?

Yes, irqs are disabled in handle_stripe, but only for relatively short periods of time. Do you have reason to think this is a problem.?

device_lock does currently protect a number of data structures. Not all of them are accessed in interrupt context, and so they could be changed to be protected by a different lock, possibly sh->lock. You would need to carefully work out exactly what it is protecting, determine which of those aren't accessed from interrupts, and see about moving them (one by one preferably) to a different lock.

NeilBrown