can I replace spin lock of stripe with mutex?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · On Friday October 24, [email protected] 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 inhandle_stripefunction spin lock of a stripe is used during donging XOR. Since betweenspin_lockandspin_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