* Maximum chunk size in dm-raid4-5.c
@ 2006-06-02 0:45 Darrick J. Wong
2006-06-02 6:07 ` Heinz Mauelshagen
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2006-06-02 0:45 UTC (permalink / raw)
To: device-mapper development; +Cc: Heinz Mauelshagen
[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]
Hi,
Is there a particular reason why CHUNK_SIZE_MAX is set to 512 sectors in
the dm raid4/5 module? I have a fakeraid controller that can create
rather huge (1MB!) RAID5 stripes that this module rejects. I set it to
2048 and as far as I can tell there haven't been any adverse stability
effects, though I suspect that gigantic stripes do wonders for disk
throughput. :P
Attached is a patch to increase it to 2048 sectors. Please apply if
it's ok.
--D
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
--- a/drivers/md/dm-raid4-5.c 2006-06-01 17:42:27.000000000 -0700
+++ b/drivers/md/dm-raid4-5.c 2006-06-01 17:42:32.000000000 -0700
@@ -70,7 +70,7 @@
#define CHUNK_SIZE 64
/* Maximum setable chunk size in sectors */
-#define CHUNK_SIZE_MAX 512
+#define CHUNK_SIZE_MAX 2048
/* Recover chunk size in sectors */
#define RECOVER_CHUNK_SIZE CHUNK_SIZE_MAX
@@ -3114,7 +3114,7 @@ static int raid_ctr(struct dm_target *ti
chunk_size > CHUNK_SIZE_MAX ||
chunk_size & (chunk_size - 1))
TI_ERR("Invalid chunk size; must "
- "be 2^^n and less equal 512");
+ "be 2^^n and less equal 2048");
/*
* In case we've got 2 or more variable raid parameters,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dmraid45big.patch --]
[-- Type: text/x-patch; name="dmraid45big.patch", Size: 713 bytes --]
--- a/drivers/md/dm-raid4-5.c 2006-06-01 17:42:27.000000000 -0700
+++ b/drivers/md/dm-raid4-5.c 2006-06-01 17:42:32.000000000 -0700
@@ -70,7 +70,7 @@
#define CHUNK_SIZE 64
/* Maximum setable chunk size in sectors */
-#define CHUNK_SIZE_MAX 512
+#define CHUNK_SIZE_MAX 2048
/* Recover chunk size in sectors */
#define RECOVER_CHUNK_SIZE CHUNK_SIZE_MAX
@@ -3114,7 +3114,7 @@ static int raid_ctr(struct dm_target *ti
chunk_size > CHUNK_SIZE_MAX ||
chunk_size & (chunk_size - 1))
TI_ERR("Invalid chunk size; must "
- "be 2^^n and less equal 512");
+ "be 2^^n and less equal 2048");
/*
* In case we've got 2 or more variable raid parameters,
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Maximum chunk size in dm-raid4-5.c
2006-06-02 0:45 Maximum chunk size in dm-raid4-5.c Darrick J. Wong
@ 2006-06-02 6:07 ` Heinz Mauelshagen
0 siblings, 0 replies; 2+ messages in thread
From: Heinz Mauelshagen @ 2006-06-02 6:07 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: device-mapper development, Heinz Mauelshagen
Darrick,
this is to limit the size of the stripe cache, because the code allocates
"RAID devices * chunk_size memory * stripes". IOW: the chunk size defines the
io size.
Right now I'm working on seperating the chunk size from the io size
(i.e. the amount of memory allocated per device), which will give us
a way to optimize memory consumption for large chunk sizes and hence
the ability to have very large chunk sizes without stripe cache memory
preasure.
Regards,
Heinz
On Thu, Jun 01, 2006 at 05:45:42PM -0700, Darrick J. Wong wrote:
> Hi,
>
> Is there a particular reason why CHUNK_SIZE_MAX is set to 512 sectors in
> the dm raid4/5 module? I have a fakeraid controller that can create
> rather huge (1MB!) RAID5 stripes that this module rejects. I set it to
> 2048 and as far as I can tell there haven't been any adverse stability
> effects, though I suspect that gigantic stripes do wonders for disk
> throughput. :P
>
> Attached is a patch to increase it to 2048 sectors. Please apply if
> it's ok.
>
> --D
>
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> --- a/drivers/md/dm-raid4-5.c 2006-06-01 17:42:27.000000000 -0700
> +++ b/drivers/md/dm-raid4-5.c 2006-06-01 17:42:32.000000000 -0700
> @@ -70,7 +70,7 @@
> #define CHUNK_SIZE 64
>
> /* Maximum setable chunk size in sectors */
> -#define CHUNK_SIZE_MAX 512
> +#define CHUNK_SIZE_MAX 2048
>
> /* Recover chunk size in sectors */
> #define RECOVER_CHUNK_SIZE CHUNK_SIZE_MAX
> @@ -3114,7 +3114,7 @@ static int raid_ctr(struct dm_target *ti
> chunk_size > CHUNK_SIZE_MAX ||
> chunk_size & (chunk_size - 1))
> TI_ERR("Invalid chunk size; must "
> - "be 2^^n and less equal 512");
> + "be 2^^n and less equal 2048");
>
> /*
> * In case we've got 2 or more variable raid parameters,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Red Hat GmbH
Consulting Development Engineer Am Sonnenhang 11
Storage Development 56242 Marienrachdorf
Germany
Mauelshagen@RedHat.com PHONE +49 171 7803392
FAX +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-02 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-02 0:45 Maximum chunk size in dm-raid4-5.c Darrick J. Wong
2006-06-02 6:07 ` Heinz Mauelshagen
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.