Linux RAID subsystem development
 help / color / mirror / Atom feed
* Re: can I replace spin lock of stripe with mutex?
       [not found] <389deec70810240825m499bb257t9e69d57f08a91efa@mail.gmail.com>
@ 2008-10-25  5:19 ` Neil Brown
  0 siblings, 0 replies; only message in thread
From: Neil Brown @ 2008-10-25  5:19 UTC (permalink / raw)
  To: hank . peng; +Cc: linux-raid

On Friday October 24, pengxihan@gmail.com 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-25  5:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <389deec70810240825m499bb257t9e69d57f08a91efa@mail.gmail.com>
2008-10-25  5:19 ` can I replace spin lock of stripe with mutex? Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox