From: Neil Brown <neilb@suse.de>
To: "hank . peng" <pengxihan@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: can I replace spin lock of stripe with mutex?
Date: Sat, 25 Oct 2008 16:19:12 +1100 [thread overview]
Message-ID: <18690.44112.137977.511038@notabene.brown> (raw)
In-Reply-To: message from hank.peng on Friday October 24
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
parent reply other threads:[~2008-10-25 5:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <389deec70810240825m499bb257t9e69d57f08a91efa@mail.gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18690.44112.137977.511038@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=pengxihan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox