From: Matti Aarnio <matti.aarnio@zmailer.org>
To: Jesper Juhl <jj@chaosbits.net>
Cc: Prakash Punnoor <prakash@punnoor.de>,
Michael Tokarev <mjt@tls.msk.ru>,
linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
neilb@suse.de
Subject: Re: Proposal: make RAID6 code optional
Date: Sat, 18 Apr 2009 17:58:50 +0300 [thread overview]
Message-ID: <20090418145850.GD28512@mea-ext.zmailer.org> (raw)
In-Reply-To: <alpine.LNX.2.00.0904181551320.16493@swampdragon.chaosbits.net>
On Sat, Apr 18, 2009 at 03:56:17PM +0200, Jesper Juhl wrote:
> On Sat, 18 Apr 2009, Prakash Punnoor wrote:
> > On Samstag 18 April 2009 10:09:54 Michael Tokarev wrote:
> > > Prakash Punnoor wrote:
.....
> > > What's your goal? What's the problem you're trying to solve?
> >
> > Having duplicate code is not good, of course. But unused code is also not
> > good. As I said, I only use RAID5, so I don't need RAID6 support. The RAID6
> > support enlarges kernel (the built-in.o in drivers/md grows from 325kb to
> > 414kb in my case), making boot time and compile time longer
>
> By a few ms perhaps - nothing that you'd ever notice in real life... A
> small price to pay for the shared code. If you were to split them all
> again, the combined total size would be greater still.
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.
There are perhaps a few kB more of codes for RAID5 and RAID6 classes - not all
local functions at each are named with relevant prefix, but overall I would
consider extracting RAID6 as a reasonable goal with common codes on RAID4/5.
> > - admittedly not
> > by a big margin. But then again I could argue: Why not put RAID0,1,10,4,5,6
> > into one big module? Makes no sense, huh?
>
> Makes perfect sense to me. Just modprobe raid.o and you have all
> raid levels available. That would make a lot of sense.
Also, systems with so many disks that they run RAID4/5/6 to begin with are
likely to have enough memory so that "wasted" 75-80 kB does not matter.
> > For me putting 5 and 6 into one
> > monolithic module makes no sense. A proper architecture would be to have some
> > common shared code (in a separate module?), not a monolithic big one.
>
> That's also a way, and certainly better than just splitting out raid6.
> --
> Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
> Plain text mails only, please http://www.expita.com/nomime.html
/Matti Aarnio
next prev parent reply other threads:[~2009-04-18 14:58 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 [this message]
2009-04-19 2:07 ` H. Peter Anvin
2009-04-19 2:27 ` NeilBrown
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=20090418145850.GD28512@mea-ext.zmailer.org \
--to=matti.aarnio@zmailer.org \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--cc=neilb@suse.de \
--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).