From: NeilBrown <neilb@suse.de>
To: Markus Stockhausen <stockhausen@collogia.de>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: RAID6 - RMW logic
Date: Thu, 31 Jul 2014 07:30:07 +1000 [thread overview]
Message-ID: <20140731073007.3fe4817a@notabene.brown> (raw)
In-Reply-To: <12EF8D94C6F8734FB2FF37B9FBEDD17358639B87@EXCHANGE.collogia.de>
[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]
On Wed, 30 Jul 2014 20:24:30 +0000 Markus Stockhausen
<stockhausen@collogia.de> wrote:
> Hi,
>
> the last days I tried to understand the RAID6 logic when recalculating
> P/Q parity (or syndrome) if only parts of a stripe are updated. As far
> as I get the current implementation right it will always read the whole
> stripe and build parities from scratch. E.g. updating a single chunk
> on a 10 disk RAID6 will read the other 7 data blocks to write the block
> plus 2 P/Q parities afterwards. Compared to the best case 3 read plus
> 3 write operations this can be quite a heavy impact. RAID5 at least
> has a shortcut for that.
>
> Being no specialist at all - but having some ideas - I would like to
> get some feedback about the following way to improve the scenario.
>
> 1) Write a modified gen_syndrome function (call it xor_syndrome)
> like in lib/raid6/xxx.c that allows to XOR an existing P/Q parity
> without overwriting it. The cost of that function would be the same
> as it only changes a few assembler commands.
>
> 2) Enhance the ops_run_prexor to call this xor_syndrome function
> for an RAID6. Fill the not relevant pages (R5_wantdrain) with an
> empty page or NULL. So the gen_syndrome will only find zeroes.
> With this call P/Q will have a pre-xored version.
>
> 3) Enhance ops_run_reconstruct6 to allow processing of changed
> blocks only. We will call xor_snydrome from there too, to XOR
> the prexored P/Q once again.
>
> 4) Enhance handle_stripe_dirtying so it will allow calculation of
> RCW versus RMW costs for the RAID6 case.
>
> Did I miss something? And if not: Will the doubled CPU consumption
> for P/Q calculation justify that way of implementation? At least
> we can avoid IOs on slow disks.
>
> Maybe it has been discussed before but I did not find it on the
> mailing list.
>
> Thanks in advance.
>
> Markus
Please see
http://comments.gmane.org/gmane.linux.raid/42559
Yes, this is something we probably want.
The previous effort stalled somehow. Maybe it just needs someone to start
pushing again.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2014-07-30 21:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 20:24 RAID6 - RMW logic Markus Stockhausen
2014-07-30 21:30 ` NeilBrown [this message]
2014-07-30 21:55 ` Ethan Wilson
2014-07-31 6:43 ` AW: " Markus Stockhausen
2014-08-04 1:22 ` NeilBrown
2014-08-10 17:49 ` AW: " Markus Stockhausen
2014-08-12 7:14 ` NeilBrown
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=20140731073007.3fe4817a@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=stockhausen@collogia.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.