Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Xiao Ni <xni@redhat.com>
To: linux-raid@vger.kernel.org, song@kernel.org
Cc: heinzm@redhat.com, ncroxon@redhat.com,
	guoqing.jiang@cloud.ionos.com, colyli@suse.de
Subject: [PATCH V4 0/4] md/raid10: Improve handling raid10 discard request
Date: Mon, 24 Aug 2020 12:11:43 +0800	[thread overview]
Message-ID: <1598242308-9619-1-git-send-email-xni@redhat.com> (raw)

Hi all

Now mkfs on raid10 which is combined with ssd/nvme disks takes a long time.
This patch set tries to resolve this problem.

v1:
Coly helps to review these patches and give some suggestions:
One bug is found. If discard bio is across one stripe but bio size is
bigger than one stripe size. After spliting, the bio will be NULL.
In this version, it checks whether discard bio size is bigger than
(2*stripe_size). 
In raid10_end_discard_request, it's better to check R10BIO_Uptodate
is set or not. It can avoid write memory to improve performance. 
Add more comments for calculating addresses.

v2:
Fix error by checkpatch.pl
Fix one bug for offset layout. v1 calculates wrongly split size
Add more comments to explain how the discard range of each component disk
is decided.

v3:
add support for far layout
Change the patch name

v4:
Pull codes that wait for blocked device into a seprate function
It can't use (stripe_size-1) as a mask to calculate. (stripe_size-1) may
not be power of 2.
It doesn't need to use a full copy of geo.
Fix warning by checkpatch.pl

Xiao Ni (5):
  md/raid10: move codes related with submitting discard bio into one
    function
  md/raid10: extend r10bio devs to raid disks
  md/raid10: pull codes that wait for blocked dev into one function
  md/raid10: improve raid10 discard request
  md/raid10: improve discard request for far layout

 drivers/md/md.c     |  23 +++
 drivers/md/md.h     |   3 +
 drivers/md/raid0.c  |  15 +-
 drivers/md/raid10.c | 419 +++++++++++++++++++++++++++++++++++++++++++++-------
 drivers/md/raid10.h |   1 +
 5 files changed, 391 insertions(+), 70 deletions(-)

-- 
2.7.5


             reply	other threads:[~2020-08-24  4:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  4:11 Xiao Ni [this message]
2020-08-24  4:11 ` [PATCH V4 1/5] md/raid10: move codes related with submitting discard bio into one function Xiao Ni
2020-08-24  4:11 ` [PATCH V4 2/5] md/raid10: extend r10bio devs to raid disks Xiao Ni
2020-08-24  4:11 ` [PATCH V4 3/5] md/raid10: pull codes that wait for blocked dev into one function Xiao Ni
2020-08-24  4:11 ` [PATCH V4 4/5] md/raid10: improve raid10 discard request Xiao Ni
2020-08-24 10:38   ` kernel test robot
2020-08-24 13:31   ` kernel test robot
2020-08-24 15:12     ` Xiao Ni
2020-08-24 15:53       ` Xiao Ni
2020-08-24  4:11 ` [PATCH V4 5/5] md/raid10: improve discard request for far layout Xiao Ni

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=1598242308-9619-1-git-send-email-xni@redhat.com \
    --to=xni@redhat.com \
    --cc=colyli@suse.de \
    --cc=guoqing.jiang@cloud.ionos.com \
    --cc=heinzm@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=ncroxon@redhat.com \
    --cc=song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox