From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: NeilBrown <neilb@suse.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-raid@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Mike Snitzer <snitzer@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Kosina <jkosina@suse.cz>, Ming Lei <ming.lei@canonical.com>,
linux-kernel@vger.kernel.org, Zheng Liu <gnehzuil.liu@gmail.com>,
linux-block@vger.kernel.org, Takashi Iwai <tiwai@suse.de>,
linux-bcache@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Alasdair Kergon <agk@redhat.com>,
Keith Busch <keith.busch@intel.com>,
dm-devel@redhat.com, Shaohua Li <shli@kernel.org>,
Kent Overstreet <kent.overstreet@gmail.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Roland Kammerer <roland.kammerer@linbit.com>
Subject: Re: [dm-devel] [RFC] block: fix blk_queue_split() resource exhaustion
Date: Fri, 8 Jul 2016 15:00:35 +0200 [thread overview]
Message-ID: <20160708130035.GW13335@soda.linbit> (raw)
In-Reply-To: <877fcwfoyv.fsf@notabene.neil.brown.name>
On Fri, Jul 08, 2016 at 07:39:36PM +1000, NeilBrown wrote:
> >> To make the patch "perfect", and maybe even more elegant we could treat
> >> ->remainder and ->recursion more alike.
> >> i.e.:
> >> - generic make request has a private "stack" of requests.
> >> - before calling ->make_request_fn(), both ->remainder and ->recursion
> >> are initialised
> >> - after ->make_request_fn(), ->remainder are spliced in to top of
> >> 'stack', then ->recursion is spliced onto that.
> >> - If stack is not empty, the top request is popped and we loop to top.
> >>
> >> This reliably follows in-order execution, and handles siblings correctly
> >> (in submitted order) if/when a request splits off multiple siblings.
> >
> > The only splitting that creates siblings on the current level
> > is blk_queue_split(), which splits the current bio into
> > "front piece" and "remainder", already processed in this order.
>
> Yes.
> I imagine that a driver *could* split a bio into three parts with a
> single allocation, but I cannot actually see any point in doing it. So
> I was over-complicating things.
>
> >
> > Anything else creating "siblings" is not creating siblings for the
> > current layer, but for the next deeper layer, which are queue on
> > "recursion" and also processed in the order they have been generated.
> >
> >> I think that as long a requests are submitted in the order they are
> >> created at each level there is no reason to expect performance
> >> regressions.
> >> All we are doing is changing the ordering between requests generated at
> >> different levels, and I think we are restoring a more natural order.
> >
> > I believe both patches combined are doing exactly this already.
> > I could rename .remainder to .todo or .incoming, though.
>
> :-) neither "remainder" or "recursion" seem like brilliant names to me,
> but I don't have anything better to suggest. Naming is hard!
> As long as a comment explains the name clearly I could cope with X and Y.
...
> I think we just might be in violent agreement.
I thought so, too :-)
Should I merge both patches,
rename to ".queue" and ".tmp",
and submit for inclusion?
Lars Ellenberg
next prev parent reply other threads:[~2016-07-08 13:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 8:22 [RFC] block: fix blk_queue_split() resource exhaustion Lars Ellenberg
2016-06-24 11:36 ` Ming Lei
2016-06-24 14:27 ` Lars Ellenberg
2016-06-24 15:15 ` Mike Snitzer
2016-06-28 8:24 ` Lars Ellenberg
2016-06-25 9:30 ` [RFC] " Ming Lei
2016-06-28 8:45 ` Lars Ellenberg
2016-07-02 10:03 ` Ming Lei
2016-07-02 10:28 ` Ming Lei
2016-07-04 8:20 ` Lars Ellenberg
2016-07-04 10:47 ` Ming Lei
2016-07-06 12:38 ` Lars Ellenberg
2016-07-06 15:57 ` Ming Lei
2016-07-07 8:03 ` Lars Ellenberg
2016-07-07 13:14 ` Ming Lei
2016-07-07 5:35 ` [dm-devel] " NeilBrown
2016-07-07 8:16 ` Lars Ellenberg
2016-07-07 12:39 ` Lars Ellenberg
2016-07-07 12:47 ` Mike Snitzer
2016-07-07 22:07 ` [dm-devel] [RFC] " NeilBrown
2016-07-08 8:02 ` Lars Ellenberg
2016-07-08 9:39 ` NeilBrown
2016-07-08 13:00 ` Lars Ellenberg [this message]
2016-07-08 13:59 ` Lars Ellenberg
2016-07-08 11:08 ` Ming Lei
2016-07-08 12:52 ` Lars Ellenberg
2016-07-08 13:05 ` Mike Snitzer
2016-07-07 12:45 ` Mike Snitzer
2016-07-07 22:40 ` NeilBrown
2016-07-07 14:36 ` Mike Snitzer
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=20160708130035.GW13335@soda.linbit \
--to=lars.ellenberg@linbit.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=gnehzuil.liu@gmail.com \
--cc=jkosina@suse.cz \
--cc=keith.busch@intel.com \
--cc=kent.overstreet@gmail.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@canonical.com \
--cc=mingo@redhat.com \
--cc=neilb@suse.com \
--cc=peterz@infradead.org \
--cc=roland.kammerer@linbit.com \
--cc=shli@kernel.org \
--cc=snitzer@redhat.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).