linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Eric Wheeler <dm-devel@lists.ewheeler.net>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
	dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>, Shaohua Li <shli@kernel.org>,
	kent.overstreet@gmail.com, Alasdair Kergon <agk@redhat.com>
Subject: Re: dm-crypt: fix lost ioprio when queuing crypto bios from task with ioprio
Date: Thu, 5 Jan 2017 11:55:19 -0500	[thread overview]
Message-ID: <20170105165518.GA7376@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.11.1612291856160.20227@mail.ewheeler.net>

On Thu, Dec 29 2016 at 11:08pm -0500,
Eric Wheeler <dm-devel@lists.ewheeler.net> wrote:

> On Sat, 17 Dec 2016, Mike Snitzer wrote:
> > 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.  
> 
> ( Its not really relevant to this bugfix, but please see this thread since 
>   you were curious about a wider audience discussion: 
>   https://www.redhat.com/archives/dm-devel/2016-July/msg00556.html )
> 
> The note above in the previous email was intended to explain how we 
> discovered the dm-crypt problem, purely as an example use case.  The 
> stable commit note discusses the real issue: lost elevator hints.
> 
> This commit fixes elevator ioprio hints passing through dm-crypt and is 
> not intended to address dm-cache, nor enable a bcache feature.
> 
> All impementations using ioprio hints beneath dm-crypt would 
> benefit---most importantly, _CFQ_ !
>   
> As it is, all ioprio hints passing through dm-crypt are lost to the 
> elevator; the elevator looses those useful bits because of queuing to 
> another thread for crypto operations.

How did you test the change?

Or put differently: what is the easiest test to run against a dm-crypt
device to verify that ioprio is being passed through?

  reply	other threads:[~2017-01-05 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LRH.2.11.1612141049250.13402@mail.ewheeler.net>
2016-12-16 22:29 ` [dm-devel] [PATCH] dm-crypt: fix lost ioprio when queuing crypto bios from task with ioprio Eric Wheeler
2016-12-17 15:58   ` Mike Snitzer
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 [this message]
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=20170105165518.GA7376@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=kent.overstreet@gmail.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 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).