Re: spin_lock_irq() in handle_stripe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday May 22, alex@xxxxxxxxxxxxx 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
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux