public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: NeilBrown <neilb@suse.de>,
	linux-raid@vger.kernel.org,
	linux-scsi <linux-scsi@vger.kernel.org>,
	JBottomley@parallels.com, Jens Axboe <axboe@kernel.dk>,
	konrad.wilk@oracle.com, elder@linaro.org,
	Josh Durgin <josh.durgin@inktank.com>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: sd_setup_discard_cmnd: BUG: unable to handle kernel NULL pointer dereference at (null)
Date: Wed, 25 Jun 2014 12:14:21 +0200	[thread overview]
Message-ID: <20140625101421.GE17123@soda.linbit> (raw)
In-Reply-To: <yq1simtgax8.fsf@sermon.lab.mkp.net>

On Tue, Jun 24, 2014 at 07:11:47PM -0400, Martin K. Petersen wrote:
> >>>>> "Lars" == Lars Ellenberg <lars.ellenberg@linbit.com> writes:
> 
> Lars> We are receiving (from network) and submitting (to lower level IO
> Lars> stack) in the same context and would like the submit to be async.
> 
> Lars> Do you intend to provide an asynchronous interface?
> 
> I guess we can look into that if there is a need.
> 
> Do different clients share that context? I.e. does a synchronous discard
> block other clients from accessing the drbd server?

Uhm, it's not like exactly like that, really.

Because the way we do some internal bookkeeping,
we announce a max discard of 4 MiB.
So if some user on the "active" (Primary) DRBD
does large discards, you will end up submitting
lots of bios, and these are async.

Bios are the entry point to DRBD.
So DRBD ships these discard-bios over to the peer,
which then right now submits them as bios, again async.
So we do some pipelining, may have a number of discard bios in flight,
and effectively the latency will be increased by something in the order
of the network rtt.

If we now have to use the synchronous interface on the peer
for each discard bio, there is no longer any pipelining,
and the overall latency of a single "user" level discard
(that ends up doing many discard bios) will noticeably increase.

Also, since the "receiver" is blocked in "submit",
we cannot meanwhile interleave other, "normal" BIOs,
so a larger discard will block all write (and depending on configuration
and current state, also read) within that DRBD resource (which again may
be one or more DRBD minor devices or "volumes").

I don't have real-life numbers on how much that may hurt.

Similar for the WRITE_SAME interface (which we do not properly support
on the DRBD protocol level yet -- backward compatibility concerns -- but
intend to support "soon").

If we only have a synchronous interface,
we will probably have to either add some "async wrapper",
or defer such submissions to worker threads.
I'd prefer to have an async submit path.

	Lars


  reply	other threads:[~2014-06-25 10:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19  7:02 sd_setup_discard_cmnd: BUG: unable to handle kernel NULL pointer dereference at (null) Stefan Priebe - Profihost AG
2014-06-20  3:08 ` Martin K. Petersen
2014-06-20 15:53   ` Lars Ellenberg
2014-06-20 16:49     ` Martin K. Petersen
2014-06-20 18:29       ` Lars Ellenberg
2014-06-21 17:48         ` Stefan Priebe
2014-06-23 13:38           ` Lars Ellenberg
2014-06-23 19:37         ` Martin K. Petersen
2014-06-24 11:53           ` Lars Ellenberg
2014-06-24 23:11             ` Martin K. Petersen
2014-06-25 10:14               ` Lars Ellenberg [this message]
2014-06-26  1:44                 ` Martin K. Petersen

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=20140625101421.GE17123@soda.linbit \
    --to=lars.ellenberg@linbit.com \
    --cc=JBottomley@parallels.com \
    --cc=axboe@kernel.dk \
    --cc=elder@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=josh.durgin@inktank.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=neilb@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