All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joey Liao <joeyliao@qnap.com>
To: linux-raid@vger.kernel.org
Subject: Why does raid0 set max_hw_sectors as chunk size but the other raid types doesn't?
Date: Mon, 30 May 2016 19:55:43 +0800	[thread overview]
Message-ID: <CAHvN=in80JrXO=tDyxNhq9d_wW1ZCCioENyTLu9tYuYYDof20w@mail.gmail.com> (raw)

Hi,

I have no idea why does raid0_run() in raid0.c use
blk_queue_max_hw_sectors() to set max_hw_sectors as the chunk size,
but the other raid types doesn't?

What's the purpose to limit the max_hw_sectors in raid0?

Is it related to the source code logic issue or the performance issue?

Besides, I have an interesting observation. If I remove all the
following queue limitation codes in raid0_run() of raid0.c, the block
size in iostat is still the same as chunk size even the input block
size is much larger than the chunk size. Why???

-  blk_queue_max_hw_sectors(mddev->queue, mddev->chunk_sectors);
-  blk_queue_max_write_same_sectors(mddev->queue, mddev->chunk_sectors);
+  //blk_queue_max_hw_sectors(mddev->queue, mddev->chunk_sectors);
+  //blk_queue_max_write_same_sectors(mddev->queue, mddev->chunk_sectors);

-  blk_queue_io_min(mddev->queue, mddev->chunk_sectors << 9);
-  blk_queue_io_opt(mddev->queue,
-                 (mddev->chunk_sectors << 9) * mddev->raid_disks);
+  //blk_queue_io_min(mddev->queue, mddev->chunk_sectors << 9);
+  /*blk_queue_io_opt(mddev->queue,
+              (mddev->chunk_sectors << 9) * mddev->raid_disks);*/

             reply	other threads:[~2016-05-30 11:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 11:55 Joey Liao [this message]
2016-06-02  4:38 ` Why does raid0 set max_hw_sectors as chunk size but the other raid types doesn't? NeilBrown
2016-06-02  9:30   ` Joey Liao

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='CAHvN=in80JrXO=tDyxNhq9d_wW1ZCCioENyTLu9tYuYYDof20w@mail.gmail.com' \
    --to=joeyliao@qnap.com \
    --cc=linux-raid@vger.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.