[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160708125225.GV13335@soda.linbit>
Date: Fri, 8 Jul 2016 14:52:25 +0200
From: Lars Ellenberg <lars.ellenberg@...bit.com>
To: Ming Lei <ming.lei@...onical.com>
Cc: NeilBrown <neilb@...e.com>,
linux-block <linux-block@...r.kernel.org>,
Jens Axboe <axboe@...nel.dk>,
"open list:SOFTWARE RAID (Multiple Disks) SUPPORT"
<linux-raid@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Mike Snitzer <snitzer@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Jiri Kosina <jkosina@...e.cz>,
"open list:BCACHE (BLOCK LAYER CACHE)" <linux-bcache@...r.kernel.org>,
Zheng Liu <gnehzuil.liu@...il.com>,
Keith Busch <keith.busch@...el.com>,
Takashi Iwai <tiwai@...e.de>,
"open list:DEVICE-MAPPER (LVM)" <dm-devel@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Shaohua Li <shli@...nel.org>,
Kent Overstreet <kent.overstreet@...il.com>,
Alasdair Kergon <agk@...hat.com>,
Roland Kammerer <roland.kammerer@...bit.com>
Subject: Re: [dm-devel] [RFC] block: fix blk_queue_split() resource exhaustion
On Fri, Jul 08, 2016 at 07:08:32PM +0800, Ming Lei wrote:
> > So after processing a particular bio, we should then process all the
> > 'child' bios - bios send to underlying devices. Then the 'sibling'
> > bios, that were split off, and then any remaining parents and ancestors.
>
> IMHO, that is just what the oneline patch is doing, isn't it?
>
> | diff --git a/block/blk-core.c b/block/blk-core.c
> | index 2475b1c7..a5623f6 100644
> | --- a/block/blk-core.c
> | +++ b/block/blk-core.c
> | @@ -2048,7 +2048,7 @@ blk_qc_t generic_make_request(struct bio *bio)
> | * should be added at the tail
> | */
> | if (current->bio_list) {
> | - bio_list_add(current->bio_list, bio);
> | + bio_list_add_head(current->bio_list, bio);
> | goto out;
> | }
Almost, but not quite.
As explained earlier, this will re-order.
It will still process bios in "deepest level first" order,
but it will process "sibling" bios in reverse submission order.
Think "very large bio" submitted to a stripe set
with small stripe width/stripe unit size.
So I'd expect this to be a performance hit in some scenarios,
unless the stack at some deeper level does back-merging in its elevator.
(If some driver is not able to merge stuff because of "reverse submission
order" this can easily mean saturating IOPS of the physical device with
small requests, throttling bandwidth to a minimum.)
That's why I mentioned it as "potential easy fix for the deadlock",
but did not suggest it as the proper way to fix this.
If however the powers that be decide that this was a non-issue,
we could use it this way.
Lars
Powered by blists - more mailing lists