linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "NeilBrown" <neilb@suse.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Matti Aarnio <matti.aarnio@zmailer.org>,
	Jesper Juhl <jj@chaosbits.net>,
	Prakash Punnoor <prakash@punnoor.de>,
	Michael Tokarev <mjt@tls.msk.ru>,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: Proposal: make RAID6 code optional
Date: Sun, 19 Apr 2009 12:27:01 +1000 (EST)	[thread overview]
Message-ID: <2954ad7f6081b2a6da33f861b0654626.squirrel@neil.brown.name> (raw)
In-Reply-To: <49EA8766.9070605@zytor.com>

On Sun, April 19, 2009 12:07 pm, H. Peter Anvin wrote:
> Matti Aarnio wrote:
>>
>> I did quick "sum of symbol sizes" lookup of the   raid.ko, and got
>> it like this:
>>
>> nm -t d -n -S
>> /lib/modules/2.6.27.21-170.2.56.fc10.x86_64/kernel/drivers/md/raid456.ko
>> | grep raid4|awk '{print $2}'|sed -e 's/^0*//g'|awk '{sum+=$1}END{print
>> sum}'
>>   ...
>>
>> raid4:   152
>> raid5:  7165
>> raid6: 75558
>>
>> Entire 64kB of that raid6 is single pre-initialized r/o datablock:
>> raid6_gfmul
>>
>> So yes, having RAID6 personality as separate module would be appropriate
>> for
>> systems that are only interested in RAID4 or RAID5.  Separating the
>> RAID4
>> personality wastes space, separating RAID5 ...  barely 2 of 4k memory
>> pages.
>>
>
> RAID 4 is really just another layout scheme for RAID 5.  But yes, moving
> RAID 6 to a separate module makes sense.  The amount of RAID 5 code not
> used by RAID 6 is fairly trivial, so the right way to do this is to have
>  the raid6 module depend on the raid5 module.

In 2.6.30, the Q syndrome code has been moved into a separate module,
so raid456.ko should be quite a bit smaller.

Of the remaining code, much is common, and some have raid5 and raid6
versions.
Part of the reason for that is that we support async xor offload for
raid5 but not for raid6, so raid6 doesn't use the async paths.

In 2.6.31, we should get async offload of the Q syndrome, so there
is a good chance that we could unify a lot of the code that currently
has separate raid5 and raid6 paths.

In code terms, the different between raid5 and raid6 is quite small
 - raid6 has an extra 'parity' block
 - raid6 cannot do read-modify-write cycles (at least with the current
   implementation)

That is not reason enough to have separate code.

>
> There used to be a raid6 module which was forked from raid5, with a lot
> of duplicate code.  That really made really no sense.
>

It was a good way to get raid6 implemented without risking raid5,
but long term I fully agree.

NeilBrown

  reply	other threads:[~2009-04-19  2:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-18  7:46 Proposal: make RAID6 code optional Prakash Punnoor
2009-04-18  8:09 ` Michael Tokarev
2009-04-18  9:16   ` Prakash Punnoor
2009-04-18 13:56     ` Jesper Juhl
2009-04-18 14:58       ` Matti Aarnio
2009-04-19  2:07         ` H. Peter Anvin
2009-04-19  2:27           ` NeilBrown [this message]
2009-04-19  6:28             ` Neil Brown
2009-04-21 13:58         ` Bill Davidsen
2009-04-21 17:23           ` H. Peter Anvin
2009-04-22  9:01             ` Goswin von Brederlow
2009-04-22 12:34               ` Bill Davidsen
2009-04-22 15:11               ` H. Peter Anvin
2009-04-22 18:00             ` Andre Noll
2009-04-22 18:31               ` Goswin von Brederlow
2009-04-22 18:50                 ` Andre Noll
2009-04-22 18:39               ` H. Peter Anvin
2009-04-22 18:57                 ` Andre Noll
2009-04-23  1:35                   ` H. Peter Anvin
2009-04-23  8:07                     ` Andre Noll

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=2954ad7f6081b2a6da33f861b0654626.squirrel@neil.brown.name \
    --to=neilb@suse.de \
    --cc=hpa@zytor.com \
    --cc=jj@chaosbits.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=matti.aarnio@zmailer.org \
    --cc=mjt@tls.msk.ru \
    --cc=prakash@punnoor.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).