From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
To: Yufen Yu <yuyufen@huawei.com>, song@kernel.org
Cc: linux-raid@vger.kernel.org, neilb@suse.com, colyli@suse.de,
xni@redhat.com, houtao1@huawei.com
Subject: Re: [PATCH v3 01/11] md/raid5: add CONFIG_MD_RAID456_STRIPE_SHIFT to set STRIPE_SIZE
Date: Wed, 27 May 2020 15:54:57 +0200 [thread overview]
Message-ID: <5fe381f9-e3ce-c2f7-dfac-9f852316b38f@cloud.ionos.com> (raw)
In-Reply-To: <20200527131933.34400-2-yuyufen@huawei.com>
Hi,
On 5/27/20 3:19 PM, Yufen Yu wrote:
> +config MD_RAID456_STRIPE_SHIFT
> + int "RAID4/RAID5/RAID6 stripe size shift"
> + default "1"
> + depends on MD_RAID456
> + help
> + When set the value as 'N', stripe size will be set as 'N << 9',
> + which is a multiple of 4KB.
If 'N << 9', then seems you are convert it to sector, do you actually
mean 'N << 12'?
> +
> + The default value is 1, that means the default stripe size is
> + 4096(1 << 9). Just setting as a bigger value when PAGE_SIZE is
> + bigger than 4096. In that case, you can set it as 2(8KB),
> + 4(16K), 16(64K).
So with the above description, the algorithm should be 2 << 12 = 8KB and
so on.
> +
> + When you try to set a big value, likely 16 on arm64 with 64KB
> + PAGE_SIZE, that means, you know size of each io that issued to
> + raid device is more than 4096. Otherwise just use default value.
> +
> + Normally, using default value can get better performance.
> + Only change this value if you know what you are doing.
> +
> +
> config MD_MULTIPATH
> tristate "Multipath I/O support"
> depends on BLK_DEV_MD
> diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
> index f90e0704bed9..b25f107dafc7 100644
> --- a/drivers/md/raid5.h
> +++ b/drivers/md/raid5.h
> @@ -472,7 +472,9 @@ struct disk_info {
> */
>
> #define NR_STRIPES 256
> -#define STRIPE_SIZE PAGE_SIZE
> +#define CONFIG_STRIPE_SIZE (CONFIG_MD_RAID456_STRIPE_SHIFT << 9)
> +#define STRIPE_SIZE \
> + (CONFIG_STRIPE_SIZE > PAGE_SIZE ? PAGE_SIZE : CONFIG_STRIPE_SIZE)
If I am not misunderstand, you need to s/9/12/ above.
Thanks,
Guoqing
next prev parent reply other threads:[~2020-05-27 13:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 13:19 [PATCH v3 00/11] md/raid5: set STRIPE_SIZE as a configurable value Yufen Yu
2020-05-27 13:19 ` [PATCH v3 01/11] md/raid5: add CONFIG_MD_RAID456_STRIPE_SHIFT to set STRIPE_SIZE Yufen Yu
2020-05-27 13:54 ` Guoqing Jiang [this message]
2020-05-27 23:30 ` John Stoffel
2020-05-28 6:17 ` Yufen Yu
2020-05-27 15:16 ` Xiao Ni
2020-05-28 6:29 ` Yufen Yu
2020-05-27 20:21 ` kbuild test robot
2020-05-28 14:23 ` Song Liu
2020-05-29 8:42 ` Yufen Yu
2020-05-27 13:19 ` [PATCH v3 02/11] md/raid5: add a member of r5pages for struct stripe_head Yufen Yu
2020-05-27 13:19 ` [PATCH v3 03/11] md/raid5: allocate and free pages of r5pages Yufen Yu
2020-05-27 13:19 ` [PATCH v3 04/11] md/raid5: set correct page offset for bi_io_vec in ops_run_io() Yufen Yu
2020-05-27 13:19 ` [PATCH v3 05/11] md/raid5: set correct page offset for async_copy_data() Yufen Yu
2020-05-27 13:19 ` [PATCH v3 06/11] md/raid5: add new xor function to support different page offset Yufen Yu
2020-05-27 13:19 ` [PATCH v3 07/11] md/raid5: add offset array in scribble buffer Yufen Yu
2020-05-27 13:19 ` [PATCH v3 08/11] md/raid5: compute xor with correct page offset Yufen Yu
2020-05-27 13:19 ` [PATCH v3 09/11] md/raid6: let syndrome computor support different " Yufen Yu
2020-05-27 13:19 ` [PATCH v3 10/11] md/raid6: compute syndrome with correct " Yufen Yu
2020-05-27 13:19 ` [PATCH v3 11/11] raid6test: adaptation with syndrome function Yufen Yu
2020-05-28 14:10 ` [PATCH v3 00/11] md/raid5: set STRIPE_SIZE as a configurable value Song Liu
2020-05-28 14:28 ` Song Liu
2020-05-29 9:32 ` Yufen Yu
2020-05-28 22:07 ` Guoqing Jiang
2020-05-29 11:49 ` Yufen Yu
2020-05-29 12:22 ` Guoqing Jiang
2020-05-30 2:15 ` Yufen Yu
2020-06-01 14:02 ` Guoqing Jiang
2020-06-02 6:59 ` Song Liu
2020-06-04 13:17 ` Yufen Yu
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=5fe381f9-e3ce-c2f7-dfac-9f852316b38f@cloud.ionos.com \
--to=guoqing.jiang@cloud.ionos.com \
--cc=colyli@suse.de \
--cc=houtao1@huawei.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=song@kernel.org \
--cc=xni@redhat.com \
--cc=yuyufen@huawei.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