All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: NeilBrown <neilb@suse.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [md PATCH 00/10] Simplify bio splitting and related code.
Date: Tue, 11 Apr 2017 10:01:12 -0700	[thread overview]
Message-ID: <20170411170112.4txdyjdat63qpsi6@kernel.org> (raw)
In-Reply-To: <149136485390.25893.1797855041954158826.stgit@noble>

On Wed, Apr 05, 2017 at 02:05:50PM +1000, Neil Brown wrote:
> This is part of my little project to make bio splitting
> in Linux uniform and dead-lock free, in a way that will mean
> that we can get rid of all the bioset threads.
> 
> The basic approach is that when a bio needs to be split, we call
> bio_split(), bio_chain() and then generic_make_request().
> We then proceed to handle the remainder without further splitting.
> Recent changes to generic_make_request() ensure that this will
> be safe from deadlocks, providing each bioset is used only once
> in the stack.
> 
> This leads to simpler code in various places.  In particular, the
> splitting of bios that is needed to work around known bad blocks
> is now much less complex.  There is only ever one r1bio per bio.
> 
> As you can see from
>  10 files changed, 335 insertions(+), 540 deletions(-)
> there is a net reduction in code.

Looks good and makes code simpler, applied, thanks Neil! The patch 1 and 6 need
comments in the code to explain how deadlock is avoided though. Care to send a
new patch?

Thanks,
Shaohua

> 
> Thanks,
> NeilBrown
> 
> ---
> 
> NeilBrown (10):
>       md/raid1: simplify the splitting of requests.
>       md/raid1: simplify alloc_behind_master_bio()
>       Revert "block: introduce bio_copy_data_partial"
>       md/raid1: simplify handle_read_error().
>       md/raid1: factor out flush_bio_list()
>       md/raid10: simplify the splitting of requests.
>       md/raid10: simplify handle_read_error()
>       md/raid5: make chunk_aligned_read() split bios more cleanly.
>       md/linear: improve bio splitting.
>       md/raid0: fix up bio splitting.
> 
> 
>  block/bio.c         |   60 ++-------
>  drivers/md/linear.c |   75 +++++------
>  drivers/md/raid0.c  |   73 +++++------
>  drivers/md/raid1.c  |  346 ++++++++++++++++++++-------------------------------
>  drivers/md/raid1.h  |    2 
>  drivers/md/raid10.c |  282 ++++++++++++++----------------------------
>  drivers/md/raid10.h |    1 
>  drivers/md/raid5.c  |   33 +++--
>  drivers/md/raid5.h  |    1 
>  include/linux/bio.h |    2 
>  10 files changed, 335 insertions(+), 540 deletions(-)
> 
> --
> Signature
> 

  parent reply	other threads:[~2017-04-11 17:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  4:05 [md PATCH 00/10] Simplify bio splitting and related code NeilBrown
2017-04-05  4:05 ` [md PATCH 01/10] md/raid1: simplify the splitting of requests NeilBrown
2017-04-05  4:05 ` [md PATCH 03/10] Revert "block: introduce bio_copy_data_partial" NeilBrown
2017-04-05  4:05 ` [md PATCH 02/10] md/raid1: simplify alloc_behind_master_bio() NeilBrown
2017-04-05  4:05 ` [md PATCH 04/10] md/raid1: simplify handle_read_error() NeilBrown
2017-04-05  4:05 ` [md PATCH 08/10] md/raid5: make chunk_aligned_read() split bios more cleanly NeilBrown
2017-04-05 22:15   ` kbuild test robot
2017-04-06  0:13   ` NeilBrown
2017-04-05  4:05 ` [md PATCH 06/10] md/raid10: simplify the splitting of requests NeilBrown
2017-04-05  4:05 ` [md PATCH 05/10] md/raid1: factor out flush_bio_list() NeilBrown
2017-04-05  4:05 ` [md PATCH 10/10] md/raid0: fix up bio splitting NeilBrown
2017-04-05  4:05 ` [md PATCH 09/10] md/linear: improve " NeilBrown
2017-04-05  4:05 ` [md PATCH 07/10] md/raid10: simplify handle_read_error() NeilBrown
2017-04-11 17:01 ` Shaohua Li [this message]
2017-04-11 23:27   ` [md PATCH 00/10] Simplify bio splitting and related code NeilBrown
2017-04-12  2:51     ` Shaohua Li
2017-04-20  1:37       ` NeilBrown

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=20170411170112.4txdyjdat63qpsi6@kernel.org \
    --to=shli@kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.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 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.