From: majianpeng <majianpeng@gmail.com>
To: Dan Williams <dan.j.williams@gmail.com>
Cc: Neil Brown <neilb@suse.de>,
Paul Menzel <paulepanter@users.sourceforge.net>,
linux-raid <linux-raid@vger.kernel.org>, shli <shli@kernel.org>
Subject: Re: Re: [PATCH V1] raidd5:Only move IO_THRESHOLD stripes from delay_list to hold_list once.
Date: Mon, 16 Jul 2012 09:09:54 +0800 [thread overview]
Message-ID: <201207160909343901731@gmail.com> (raw)
In-Reply-To: CAA9_cmcLEYeu9VaVTgVW=CX+JvTyA_ubAmrAkpQdxGmRkGj_3A@mail.gmail.com
On 2012-07-14 07:56 Dan Williams <dan.j.williams@gmail.com> Wrote:
>[ adding Shaohua ]
>
>On Fri, Jul 13, 2012 at 3:31 AM, majianpeng <majianpeng@gmail.com> wrote:
>> To improve write perfomance by decreasing the preread stripe,only move
>> IO_THRESHOLD stripes from delay_list to hold_list once.
>>
>> Using the follow command:
>> dd if=/dev/zero of=/dev/md0 bs=2M count=52100.
>>
>> At default condition: speed is 95MB/s.
>> At the condition of preread_bypass_threshold was equal zero:speed is 105MB/s.
>> Using this patch:speed is 123MB/s.
>>
>> If preread_bypass_threshold was zero,the performance will be better,but
>> not better than this patch.
>> I think maybe two reason:
>> 1:If bio is REQ_SYNC
>> 2:In function __get_priority_stripe():
>>>> } else if (!list_empty(&conf->hold_list) &&
>>>> ((conf->bypass_threshold &&
>>>> conf->bypass_count > conf->bypass_threshold) ||
>>>> atomic_read(&conf->pending_full_writes) == 0)) {
>> Preread_bypass_threshold is one condition of getting stripe from
>> hold_list.So only control the number of hold_list can get better
>> performance.
>
>So this is a pretty obvious tradeoff of increased latency for improved
>throughput. Any idea how much this change affects latency?
>Especially in the fast device case?
I did not think the latency.If it only fetch preread_bypass_threshold stripes from delay_list to
host_list,the latency can be control by userspace.
The code like :
static void raid5_activate_delayed(struct r5conf *conf)
{
+ int count = 0;
if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) {
while (!list_empty(&conf->delayed_list)) {
struct list_head *l = conf->delayed_list.next;
@@ -3672,6 +3673,8 @@ static void raid5_activate_delayed(struct r5conf *conf)
if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
atomic_inc(&conf->preread_active_stripes);
list_add_tail(&sh->lru, &conf->hold_list);
+ if (++count >= conf->preread_active_stripes)
+ break;
}
next prev parent reply other threads:[~2012-07-16 1:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 10:31 [PATCH V1] raidd5:Only move IO_THRESHOLD stripes from delay_list to hold_list once majianpeng
2012-07-13 23:56 ` Dan Williams
2012-07-16 1:09 ` majianpeng [this message]
2012-07-16 7:46 ` NeilBrown
2012-07-16 8:53 ` majianpeng
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=201207160909343901731@gmail.com \
--to=majianpeng@gmail.com \
--cc=dan.j.williams@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=paulepanter@users.sourceforge.net \
--cc=shli@kernel.org \
/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.