spin_lock_irq() in handle_stripe()
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
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 usingdevice_lockwhich can be grabbed from interrupt context (_end_iofunctions). can we replace it by a new separate spinlock and don't block interrupts inhandle_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