Re: can I replace spin lock of stripe with mutex?

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

 



On Friday October 24, pengxihan@xxxxxxxxx wrote:
> hi, neil:
> I want to use hardware engine to do XOR. The driver is based on
> interrupt way, which will cause sleep. I found that in handle_stripe
> function spin lock of a stripe is used during donging XOR. Since
> between spin_lock and spin_unlock, sleep is not allowed, I want to
> replace it with mutex, does it make sense?
> 

What kernel version are you looking at?
I ask because for quite some months (years?) we have had explicit
support for hardware based xor using the "async_tx" extension to the
async-crypto API.
See  crypto/async_tx/ and drivers/dma/

That is a much more complete approach.  Just changing the lock type
would not really help, there are other reasons why we cannot sleep in
that code.

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