linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Mike Snitzer <snitzer@redhat.com>,
	Milan Broz <gmazyland@gmail.com>,
	Mikulas Patocka <mpatocka@redhat.com>,
	dm-devel@redhat.com, Andi Kleen <andi@firstfloor.org>,
	dm-crypt@saout.de, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	Christian Schmidt <schmidt@digadd.de>,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: dm-crypt performance
Date: Thu, 28 Mar 2013 12:44:43 -0700	[thread overview]
Message-ID: <20130328194443.GG14088@htj.dyndns.org> (raw)
In-Reply-To: <20130328193343.GA15969@redhat.com>

Hello,

On Thu, Mar 28, 2013 at 03:33:43PM -0400, Vivek Goyal wrote:
> I am curious why out of order bio is a problem. Doesn't the elevator
> already merge bio's with existing requests and if merging does not
> happen then requests are sorted in order. So why ordering is not
> happening properly with dm-crypt. What additional info dm-crypt has
> that it can do better ordering than IO scheduler.

Hmmm... well, for one, it doesn't only change ordering.  It also
changes the timings.  Before iosched would get contiguous stream of
IOs when the queue gets unplugged (BTW, how does dm crypt handling
plugging?  If not handled properly, it could definitely affect a lot
of things.)  With multiple threads doing encryption in the middle, the
iosched could get scattered IOs which could easily span multiple
millisecs.  Even if context tagging was done properly, it could easily
lead to much less efficient IO patterns to hardware.

Keeping IO order combined with proper plug handling would not only
keep the ordering constant but also the relative timing of events,
which is an important factor when scheduling IOs.

> CFQ might seeing more performance hit because we maintain per
> process queues and kernel threads might not be sharing the IO context
> (i am not sure). So if all the crypto threads can share the IO
> context, atleast it will make sure all IO from them goes into a
> single queue.

Right, this is important too although I fail to see how workqueue
vs. custom dispatch would make any difference here.  dm-crypt should
definitely be using bio_associate_current().

Thanks.

-- 
tejun

  reply	other threads:[~2013-03-28 19:44 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.1303252051520.9745@file.rdu.redhat.com>
2013-03-26 12:27 ` [dm-devel] dm-crypt performance Alasdair G Kergon
2013-03-26 20:05   ` Milan Broz
2013-03-26 20:28     ` Mike Snitzer
2013-03-26 20:58       ` Milan Broz
2013-03-28 18:53       ` Tejun Heo
2013-03-28 19:33         ` Vivek Goyal
2013-03-28 19:44           ` Tejun Heo [this message]
2013-03-28 20:38             ` Vivek Goyal
2013-03-28 20:45               ` Tejun Heo
2013-04-09 17:51                 ` dm-crypt parallelization patches Mikulas Patocka
2013-04-09 17:57                   ` Tejun Heo
2013-04-09 18:08                     ` Mikulas Patocka
2013-04-09 18:10                       ` Tejun Heo
2013-04-09 18:42                         ` Vivek Goyal
2013-04-09 18:57                           ` Tejun Heo
2013-04-09 19:13                             ` Vivek Goyal
2013-04-09 19:42                         ` Mikulas Patocka
2013-04-09 19:52                           ` Tejun Heo
2013-04-09 20:32                             ` Mikulas Patocka
2013-04-09 21:02                               ` Tejun Heo
2013-04-09 21:03                                 ` Tejun Heo
2013-04-09 21:07                               ` Vivek Goyal
2013-04-09 21:18                                 ` Mikulas Patocka
2013-04-10 19:24                                   ` Vivek Goyal
2013-04-10 23:42                                     ` [PATCH] make dm and dm-crypt forward cgroup context (was: dm-crypt parallelization patches) Mikulas Patocka
2013-04-10 23:50                                       ` Tejun Heo
2013-04-11 19:49                                         ` [PATCH v2] " Mikulas Patocka
2013-04-11 19:52                                           ` Tejun Heo
2013-04-11 20:00                                             ` Tejun Heo
2013-04-12  0:06                                               ` Mikulas Patocka
2013-04-12  0:22                                                 ` Tejun Heo
2013-04-12  5:59                                                   ` [PATCH v2] make dm and dm-crypt forward cgroup context Milan Broz
2013-04-12 18:17                                                   ` [PATCH v2] make dm and dm-crypt forward cgroup context (was: dm-crypt parallelization patches) Mikulas Patocka
2013-04-12 18:01                                               ` Mikulas Patocka
2013-04-12 18:29                                                 ` Tejun Heo
2013-04-15 13:02                                                   ` Mikulas Patocka
2013-04-16 17:24                                                     ` Tejun Heo
2013-04-16 19:41                                                       ` Mikulas Patocka
2013-04-18 16:47                                                       ` Mike Snitzer
2013-04-18 17:03                                                         ` Tejun Heo
2013-05-22 18:50                                                           ` Mike Snitzer
2013-05-22 19:48                                                             ` Tejun Heo
2013-04-09 18:36                   ` dm-crypt parallelization patches Vivek Goyal
2013-04-09 18:08     ` [dm-devel] dm-crypt performance Mikulas Patocka
2013-04-09 18:59       ` [dm-crypt] " Milan Broz

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=20130328194443.GG14088@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=axboe@kernel.dk \
    --cc=dm-crypt@saout.de \
    --cc=dm-devel@redhat.com \
    --cc=gmazyland@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=schmidt@digadd.de \
    --cc=snitzer@redhat.com \
    --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).