From: Richard Kralovic <Richard.Kralovic@dcs.fmph.uniba.sk>
To: Milan Broz <mbroz@redhat.com>
Cc: linux-kernel@vger.kernel.org,
device-mapper development <dm-devel@redhat.com>
Subject: Re: CFQ and dm-crypt
Date: Mon, 25 Oct 2010 11:53:39 +0200 [thread overview]
Message-ID: <4CC553A3.5070308@dcs.fmph.uniba.sk> (raw)
In-Reply-To: <4CC45BAD.2060308@redhat.com>
On 10/24/10 18:15, Milan Broz wrote:
> On 10/24/2010 03:51 PM, Richard Kralovic wrote:
>> CFQ io scheduler relies on using task_struct current to determine which
>> process makes the io request. On the other hand, some dm modules (such
>> as dm-crypt) use separate threads for doing io. As CFQ sees only these
>> threads, it provides a very poor performance in such a case.
>>
>> IMHO the correct solution for this would be to store, for every io
>> request, the process that initiated it (and preserve this information
>> while the request is processed by device mapper). Would that be feasible?
>
> Yes, this seems to be correct solution. I think this should be
> handled by core device-mapper (as you noted, more dm targets using
> threads to process.)
Do you think it is possible to handle this in device-mapper, without any
support from the cfq code?
I also noticed that a solution for this problem was proposed a few years
ago by Hirokazu Takahashi (a patch for linux-2.6.25,
http://lkml.org/lkml/2008/4/22/193), but there was no response to it. Is
such an approach wrong?
>> Other possibility is to avoid using separate threads for doing io in dm
>> modules. The attached patch (against 2.6.36) modifies dm-crypt in this
>> way, what results into much better behavior of cfq (e.g., io priorities
>> work correctly).
>
> Sorry, this completely dismantles the way how dm-crypt solves problems
> with stacking dm devices.
> Basically it reintroduces possible deadlocks for low memory
> situations (the reason why there are these threads).
Would the problem with deadlock be still present if the io worker queue
was used for writes only, but reads were issued directly? (Even this
would be a significant improvement for people using cfq and a full-disk
encryption over dm-crypt, since asynchronous writes are not supported by
cfq anyway.)
Richard
next prev parent reply other threads:[~2010-10-25 9:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-24 13:51 Richard Kralovic
2010-10-24 16:15 ` Milan Broz
2010-10-25 9:53 ` Richard Kralovic [this message]
2010-10-25 11:09 ` Milan Broz
2010-10-25 14:22 ` Jeff Moyer
2010-10-25 20:59 ` Vivek Goyal
2010-10-26 8:37 ` Richard Kralovic
2010-10-26 10:57 ` Vivek Goyal
2010-11-03 3:23 ` Jeff Moyer
2010-11-03 15:54 ` Richard Kralovic
2010-11-04 21:07 ` Jeff Moyer
2010-11-16 16:44 ` Jeff Moyer
2010-11-21 20:16 ` Richard Kralovic
2010-11-22 14:20 ` Jeff Moyer
2010-11-22 21:01 ` Richard Kralovic
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=4CC553A3.5070308@dcs.fmph.uniba.sk \
--to=richard.kralovic@dcs.fmph.uniba.sk \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbroz@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
all inboxes | Powered by JetHome®