All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Eric Wheeler <dm-devel@lists.ewheeler.net>
Cc: dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com>,
	Alasdair Kergon <agk@redhat.com>, Shaohua Li <shli@kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-bcache@vger.kernel.org,
	Vivek Goyal <vgoyal@redhat.com>
Subject: Re: dm-crypt: fix lost ioprio when queuing crypto bios from task with ioprio
Date: Sat, 17 Dec 2016 10:58:00 -0500	[thread overview]
Message-ID: <20161217155800.GA6580@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.11.1612161414280.9898@mail.ewheeler.net>

On Fri, Dec 16 2016 at  5:29pm -0500,
Eric Wheeler <dm-devel@lists.ewheeler.net> wrote:

> On Wed, 14 Dec 2016, Eric Wheeler wrote:
> > Since dm-crypt queues writes (and sometimes reads) to a different kernel
> > thread (workqueue), the bios will dispatch from tasks with different
> > io_context->ioprio settings than the submitting task, thus giving
> > incorrect ioprio hints to the io scheduler.
> 
> The motivation of this patch is for ioprio-driven writebackup/bypass 
> hinting inside bcache when bcache is under dm-crypt which Jens is picking 
> up for 4.10:
>   https://lkml.org/lkml/2016/12/6/607

I now see your commits:
b71de4659fba4e42c7 bcache: introduce per-process ioprio-based bypass/writeback hints
82e7192711c3855038 bcache: documentation for ioprio cache hinting

You'd think this is the type of thing that you'd have proposed to a
wider audience.  I'm sure you're aware that dm-cache exists?

If you did then it would've been on my radar with a shot of having DM in
shape in time for 4.10.

> Without assigning the ioprio before queuing to the en/decrypt queues, 
> bcache isn't notified of the priority---and presumably neither is the IO 
> scheduler.
> 
> The ioprio aware schedulers like CFQ and BFQ also benefit with more 
> knowledge about the bio's when passing through dm-crypt.  It would be 
> great if this can be accepted for 4.10, too.

The time for 4.10 inclusion has passed.  This needs to wait until 4.11.

It also needs more review, testing and possible re-working.  Each DM
target shouldn't have to worry about these details (though I do grant
that dm-crypt.c:clone_init call to bio_set_prio makes sense).

A more generic solution is needed (likely in DM core).

A while ago, Vivek floated a patch that spoke to the need for iocontext
(for the purposes of cgroups):
 https://patchwork.kernel.org/patch/8485451/

I don't consider your patch too dissimilar.  But it just needs to be
worked on during a development window.  On to 4.11 ;)

Mike

  reply	other threads:[~2016-12-17 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 18:55 [PATCH] dm-crypt: fix lost ioprio when queuing crypto bios from task with ioprio Eric Wheeler
2016-12-16 22:29 ` [dm-devel] " Eric Wheeler
2016-12-17 15:58   ` Mike Snitzer [this message]
2016-12-18 22:54     ` Kent Overstreet
2016-12-18 23:17       ` Mike Snitzer
2016-12-18 23:23         ` Kent Overstreet
2016-12-30  4:08     ` Eric Wheeler
2017-01-05 16:55       ` Mike Snitzer
2017-01-05 16:55         ` Mike Snitzer
2017-03-11  1:08         ` [dm-devel] " Eric Wheeler

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=20161217155800.GA6580@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@lists.ewheeler.net \
    --cc=dm-devel@redhat.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=shli@kernel.org \
    --cc=vgoyal@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 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.