From: Jens Axboe <axboe@kernel.dk>
To: Jan Kara <jack@suse.cz>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: IO request merging
Date: Thu, 16 Oct 2014 10:10:39 -0600 [thread overview]
Message-ID: <543FEDFF.2000105@kernel.dk> (raw)
In-Reply-To: <20141016122740.GI6085@quack.suse.cz>
On 10/16/2014 06:27 AM, Jan Kara wrote:
> Hello,
>
> one of our customers was complaining that elv_attempt_insert_merge()
> merges two requests (via blk_attempt_req_merge()) without asking IO
> scheduler for permission (->elevator_allow_merge_fn() callback). Now for
> them this is a problem because of their custom IO scheduler but looking
> into the code this can result in somewhat suboptimal behavior for CFQ as
> well (merging two requests from different IO contexts, possibly merging
> sync & async request). What do others think about this?
>
> Regarding possible fix, we cannot really call ->elevator_allow_merge_fn()
> because that assumes it is called from a context of a process submitting the
> passed bio. So we would need to create a separate allow merge callback for
> this.
It would need a new (rq to rq) merge hook, if they have a custom IO
scheduler, they should submit a change to allow that kind of behaviour.
Outside of potentially mixing sync and async IO (which seems like
something that should rarely/never happen), not sure I see a lot of
downsides. And that case could be explicitly checked in attempt_merge()
or blk_attempt_req_merge() without having to define a new hook to catch
that specific case. For the hook, cfq would lookup the io contexts and
compare, and basically disallow any merge that crosses a cfq io context
boundary. But given that I would only expect these types of merges to
happen very rarely, the sync vs async check would be good enough for me.
--
Jens Axboe
next prev parent reply other threads:[~2014-10-16 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 12:27 IO request merging Jan Kara
2014-10-16 16:10 ` Jens Axboe [this message]
2014-10-30 19:56 ` Jan Kara
2014-10-31 8:30 ` Jan Kara
2014-10-31 16:12 ` Jens Axboe
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=543FEDFF.2000105@kernel.dk \
--to=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.