From: Milan Broz <mbroz@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: device-mapper development <dm-devel@redhat.com>,
Andi Kleen <andi@firstfloor.org>,
pedrib@gmail.com, linux-kernel@vger.kernel.org,
Alasdair G Kergon <agk@redhat.com>,
Mike Snitzer <msnitzer@redhat.com>
Subject: Re: [dm-devel] [PATCH] DM-CRYPT: Scale to multiple CPUs v3
Date: Sun, 10 Oct 2010 14:38:17 +0200 [thread overview]
Message-ID: <4CB1B3B9.4030205@redhat.com> (raw)
In-Reply-To: <20101010115941.GA8539@basil.fritz.box>
On 10/10/2010 01:59 PM, Andi Kleen wrote:
> DM-CRYPT: Scale to multiple CPUs v3
>
> [Due to popular demand this is a port of the dm-crypt scalability
> patch to 2.6.36-rc7. The 2.6.35 and .32 patches were widely used by
> lots of users with good results.
>
Hi Andi,
please can you check split patches in
http://mbroz.fedorapeople.org/dm-crypt/2.6.36-devel/
is there some change in your new version?
Can I send this to dm-devel instead?
(It is better for review.)
I know that I fixed some small bug there and these are heavily
tested by me.
Alasdair, _please_ can you include it in dm-tree?
I asked you at least 5 times already, my last info is that
you are planning this for 2.6.37, right?
> static void kcryptd_queue_io(struct dm_crypt_io *io)
> {
> - struct crypt_config *cc = io->target->private;
> + int cpu;
> +
> + /*
> + * Since we only have a single worker per CPU in extreme
> + * cases there might be nesting (dm-crypt on another dm-crypt)
> + * To avoid deadlock run the work directly then.
> + */
> + cpu = get_cpu();
> + if (per_cpu(io_wq_cpu, cpu) == current && !in_interrupt()) {
> + put_cpu();
> + kcryptd_io(&io->work);
> + return;
> + }
This is only place where I see problem - if running in crypto async mode,
callback is called in interrupt mode (please correct me if I am wrong).
So with async crypto and nested dm-crypt mapping this deadlock
prevention doesn't work - so is there still possibility of deadlock?
(I think we can ignore it for now, I tried create some "real world" deadlocky
mappings some time ago and was not able to catch it even on high memory pressure.)
Milan
next prev parent reply other threads:[~2010-10-10 12:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 11:59 [PATCH] DM-CRYPT: Scale to multiple CPUs v3 Andi Kleen
2010-10-10 12:38 ` Milan Broz [this message]
2010-10-10 12:53 ` [dm-devel] " Milan Broz
2010-10-10 13:09 ` Andi Kleen
2010-10-10 13:08 ` Andi Kleen
2010-10-10 15:34 ` Milan Broz
2010-10-10 16:06 ` Andi Kleen
2010-10-10 16:22 ` Mike Snitzer
2010-10-10 16:41 ` Milan Broz
2010-10-10 17:07 ` Mike Snitzer
2010-10-10 18:56 ` [PATCH] Fix double free and use generic private pointer in per-cpu struct Milan Broz
2010-10-14 19:26 ` [dm-devel] " Milan Broz
2010-10-20 14:20 ` [dm-devel] [PATCH] DM-CRYPT: Scale to multiple CPUs v3 Milan Broz
2010-10-20 17:32 ` Alasdair G Kergon
2010-10-10 17:01 ` Alasdair G Kergon
2010-10-10 17:44 ` Andi Kleen
2010-10-10 18:17 ` [dm-devel] " Alasdair G Kergon
2010-10-10 18:48 ` Alasdair G Kergon
2010-10-10 18:51 ` [dm-devel] " Andi Kleen
2010-10-10 19:07 ` Alasdair G Kergon
2010-10-10 19:16 ` Andi Kleen
2010-10-10 19:31 ` Milan Broz
2010-10-10 20:20 ` Andi Kleen
2010-10-11 9:32 ` 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=4CB1B3B9.4030205@redhat.com \
--to=mbroz@redhat.com \
--cc=agk@redhat.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msnitzer@redhat.com \
--cc=pedrib@gmail.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).