From: Jack Wang <jinpu.wang@profitbricks.com>
To: NeilBrown <neilb@suse.com>, Jens Axboe <axboe@kernel.dk>
Cc: LKML <linux-kernel@vger.kernel.org>,
Lars Ellenberg <lars.ellenberg@linbit.com>,
Kent Overstreet <kent.overstreet@gmail.com>,
Pavel Machek <pavel@ucw.cz>, Mike Snitzer <snitzer@redhat.com>,
Mikulas Patocka <mpatocka@redhat.com>
Subject: Re: [PATCH] blk: improve order of bio handling in generic_make_request()
Date: Mon, 6 Mar 2017 10:43:59 +0100 [thread overview]
Message-ID: <3f261bbe-dcec-db4b-947c-357a5b86a515@profitbricks.com> (raw)
In-Reply-To: <87lgsjj9w8.fsf@notabene.neil.brown.name>
On 06.03.2017 05:40, NeilBrown wrote:
> On Fri, Mar 03 2017, Jack Wang wrote:
>>
>> Thanks Neil for pushing the fix.
>>
>> We can optimize generic_make_request a little bit:
>> - assign bio_list struct hold directly instead init and merge
>> - remove duplicate code
>>
>> I think better to squash into your fix.
>
> Hi Jack,
> I don't object to your changes, but I'd like to see a response from
> Jens first.
> My preference would be to get the original patch in, then other changes
> that build on it, such as this one, can be added. Until the core
> changes lands, any other work is pointless.
>
> Of course if Jens wants a this merged before he'll apply it, I'll
> happily do that.
>
> Thanks,
> NeilBrown
Hi Neil,
Totally agree, let's wait for Jens's decision.
Hi Jens,
Please consider this fix also for stable 4.3+
Thanks,
Jack Wang
>
>
>
>> ---
>> block/blk-core.c | 9 ++-------
>> 1 file changed, 2 insertions(+), 7 deletions(-)
>>
>> diff --git a/block/blk-core.c b/block/blk-core.c
>> index 3bc7202..b29b7e5 100644
>> --- a/block/blk-core.c
>> +++ b/block/blk-core.c
>> @@ -2147,8 +2147,7 @@ blk_qc_t generic_make_request(struct bio *bio)
>> struct bio_list lower, same, hold;
>>
>> /* Create a fresh bio_list for all subordinate requests */
>> - bio_list_init(&hold);
>> - bio_list_merge(&hold, &bio_list_on_stack);
>> + hold = bio_list_on_stack;
>> bio_list_init(&bio_list_on_stack);
>>
>> ret = q->make_request_fn(q, bio);
>> @@ -2168,14 +2167,10 @@ blk_qc_t generic_make_request(struct bio *bio)
>> bio_list_merge(&bio_list_on_stack, &lower);
>> bio_list_merge(&bio_list_on_stack, &same);
>> bio_list_merge(&bio_list_on_stack, &hold);
>> -
>> - bio = bio_list_pop(current->bio_list);
>> } else {
>> - struct bio *bio_next = bio_list_pop(current->bio_list);
>> -
>> bio_io_error(bio);
>> - bio = bio_next;
>> }
>> + bio = bio_list_pop(current->bio_list);
>> } while (bio);
>> current->bio_list = NULL; /* deactivate */
>>
>> --
>>
>> Regards,
>> Jack
next prev parent reply other threads:[~2017-03-06 9:47 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 5:14 NeilBrown
2017-03-03 9:28 ` Jack Wang
2017-03-06 4:40 ` NeilBrown
2017-03-06 9:43 ` Jack Wang [this message]
2017-03-07 15:46 ` Pavel Machek
2017-03-07 15:53 ` Jack Wang
2017-03-07 16:21 ` Jens Axboe
2017-03-06 20:18 ` Jens Axboe
2017-03-07 8:49 ` Jack Wang
2017-03-07 16:52 ` Mike Snitzer
2017-03-07 17:05 ` Jens Axboe
2017-03-07 17:14 ` Mike Snitzer
2017-03-07 20:29 ` NeilBrown
2017-03-07 23:01 ` Mike Snitzer
2017-03-08 16:40 ` Mikulas Patocka
2017-03-08 17:15 ` Lars Ellenberg
2017-03-09 6:08 ` NeilBrown
2017-03-08 11:46 ` Lars Ellenberg
2017-03-07 20:38 ` [PATCH v2] " NeilBrown
2017-03-10 4:32 ` NeilBrown
2017-03-10 4:33 ` [PATCH 1/5 v3] " NeilBrown
2017-03-10 4:34 ` [PATCH 2/5] blk: remove bio_set arg from blk_queue_split() NeilBrown
2017-03-10 4:35 ` [PATCH 3/5] blk: make the bioset rescue_workqueue optional NeilBrown
2017-03-10 4:36 ` [PATCH 4/5] blk: use non-rescuing bioset for q->bio_split NeilBrown
2017-03-10 4:37 ` [PATCH 5/5] block_dev: make blkdev_dio_pool a non-rescuing bioset NeilBrown
2017-03-10 4:38 ` [PATCH v2] blk: improve order of bio handling in generic_make_request() Jens Axboe
2017-03-10 4:40 ` Jens Axboe
2017-03-10 5:19 ` NeilBrown
2017-03-10 12:34 ` Lars Ellenberg
2017-03-10 14:38 ` Mike Snitzer
2017-03-10 14:55 ` Mikulas Patocka
2017-03-10 15:07 ` Jack Wang
2017-03-10 15:35 ` Mike Snitzer
2017-03-10 18:51 ` Lars Ellenberg
2017-03-11 0:47 ` 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=3f261bbe-dcec-db4b-947c-357a5b86a515@profitbricks.com \
--to=jinpu.wang@profitbricks.com \
--cc=axboe@kernel.dk \
--cc=kent.overstreet@gmail.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=neilb@suse.com \
--cc=pavel@ucw.cz \
--cc=snitzer@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®