Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594775
| From | Mike Snitzer <snitzer@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: blk: improve order of bio handling in generic_make_request() |
| Date | 2017-03-08 02:00 +0100 |
| Message-ID | <tiy7o-7dF-13@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <tij8l-4ZD-7@gated-at.bofh.it> <tiqWd-2hL-25@gated-at.bofh.it> <tiqWd-2hL-23@gated-at.bofh.it> <tirfA-2oi-11@gated-at.bofh.it> <tiuGt-4Vz-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 07 2017 at 3:29pm -0500,
NeilBrown <neilb@suse.com> wrote:
> On Tue, Mar 07 2017, Mike Snitzer wrote:
>
> > On Tue, Mar 07 2017 at 12:05pm -0500,
> > Jens Axboe <axboe@kernel.dk> wrote:
> >
> >> On 03/07/2017 09:52 AM, Mike Snitzer wrote:
> >> >
> >> > In addition to Jack's MD raid test there is a DM snapshot deadlock test,
> >> > albeit unpolished/needy to get running, see:
> >> > https://www.redhat.com/archives/dm-devel/2017-January/msg00064.html
> >>
> >> Can you run this patch with that test, reverting your DM workaround?
> >
> > Yeap, will do. Last time Mikulas tried a similar patch it still
> > deadlocked. But I'll give it a go (likely tomorrow).
>
> I don't think this will fix the DM snapshot deadlock by itself.
> Rather, it make it possible for some internal changes to DM to fix it.
> The DM change might be something vaguely like:
>
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index 3086da5664f3..06ee0960e415 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -1216,6 +1216,14 @@ static int __split_and_process_non_flush(struct clone_info *ci)
>
> len = min_t(sector_t, max_io_len(ci->sector, ti), ci->sector_count);
>
> + if (len < ci->sector_count) {
> + struct bio *split = bio_split(bio, len, GFP_NOIO, fs_bio_set);
> + bio_chain(split, bio);
> + generic_make_request(bio);
> + bio = split;
> + ci->sector_count = len;
> + }
> +
> r = __clone_and_map_data_bio(ci, ti, ci->sector, &len);
> if (r < 0)
> return r;
>
> Instead of looping inside DM, this change causes the remainder to be
> passed to generic_make_request() and DM only handles or region at a
> time. So there is only one loop, in the top generic_make_request().
> That loop will not reliable handle bios in the "right" order.
s/not reliable/now reliably/ ? ;)
But thanks for the suggestion Neil. Will dig in once I get through a
backlog of other DM target code I have queued for 4.12 review.
Mike
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-03 06:20 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() Jack Wang <jinpu.wang@profitbricks.com> - 2017-03-03 10:40 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-06 05:50 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() Jack Wang <jinpu.wang@profitbricks.com> - 2017-03-06 10:50 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() Pavel Machek <pavel@ucw.cz> - 2017-03-07 16:50 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() Jens Axboe <axboe@kernel.dk> - 2017-03-07 17:30 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() Jack Wang <jinpu.wang@profitbricks.com> - 2017-03-07 20:00 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() Jens Axboe <axboe@kernel.dk> - 2017-03-07 03:10 +0100
Re: [PATCH] blk: improve order of bio handling in generic_make_request() Jack Wang <jinpu.wang@profitbricks.com> - 2017-03-07 10:00 +0100
Re: blk: improve order of bio handling in generic_make_request() Jens Axboe <axboe@kernel.dk> - 2017-03-07 18:20 +0100
Re: blk: improve order of bio handling in generic_make_request() Mike Snitzer <snitzer@redhat.com> - 2017-03-07 18:40 +0100
Re: blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-07 22:20 +0100
Re: blk: improve order of bio handling in generic_make_request() Mike Snitzer <snitzer@redhat.com> - 2017-03-08 02:00 +0100
Re: blk: improve order of bio handling in generic_make_request() Mikulas Patocka <mpatocka@redhat.com> - 2017-03-08 18:00 +0100
Re: blk: improve order of bio handling in generic_make_request() Lars Ellenberg <lars.ellenberg@linbit.com> - 2017-03-08 18:40 +0100
Re: blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-09 07:10 +0100
Re: blk: improve order of bio handling in generic_make_request() Mike Snitzer <snitzer@redhat.com> - 2017-03-07 18:50 +0100
Re: blk: improve order of bio handling in generic_make_request() Lars Ellenberg <lars.ellenberg@linbit.com> - 2017-03-08 14:00 +0100
[PATCH v2] blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-07 21:50 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-10 05:40 +0100
[PATCH 5/5] block_dev: make blkdev_dio_pool a non-rescuing bioset NeilBrown <neilb@suse.com> - 2017-03-10 05:40 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Jens Axboe <axboe@kernel.dk> - 2017-03-10 05:40 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Jens Axboe <axboe@kernel.dk> - 2017-03-10 05:50 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-10 06:20 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Lars Ellenberg <lars.ellenberg@linbit.com> - 2017-03-10 13:40 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Mike Snitzer <snitzer@redhat.com> - 2017-03-10 15:40 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Mikulas Patocka <mpatocka@redhat.com> - 2017-03-10 16:00 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Jack Wang <jinpu.wang@profitbricks.com> - 2017-03-10 16:20 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Mike Snitzer <snitzer@redhat.com> - 2017-03-10 16:40 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() Lars Ellenberg <lars.ellenberg@linbit.com> - 2017-03-10 20:00 +0100
Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-11 01:50 +0100
[PATCH 1/5 v3] blk: improve order of bio handling in generic_make_request() NeilBrown <neilb@suse.com> - 2017-03-10 05:40 +0100
[PATCH 3/5] blk: make the bioset rescue_workqueue optional. NeilBrown <neilb@suse.com> - 2017-03-10 05:40 +0100
[PATCH 4/5] blk: use non-rescuing bioset for q->bio_split. NeilBrown <neilb@suse.com> - 2017-03-10 05:40 +0100
[PATCH 2/5] blk: remove bio_set arg from blk_queue_split() NeilBrown <neilb@suse.com> - 2017-03-10 05:40 +0100
csiph-web