From: Milan Broz <mbroz@redhat.com>
To: Yan Li <elliot.li.tech@gmail.com>
Cc: Ritesh Raj Sarraf <rrs@researchut.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
dm-crypt@saout.de, linux-kernel@vger.kernel.org,
dm-devel@redhat.com, rjmaomao@gmail.com,
Andrew Morton <akpm@linux-foundation.org>,
Alasdair G Kergon <agk@redhat.com>,
Christophe Saout <christophe@saout.de>
Subject: Re: 2.6.24 Kernel Soft Lock Up with heavy I/O in dm-crypt
Date: Mon, 02 Jun 2008 14:51:04 +0200 [thread overview]
Message-ID: <4843ECB8.4010002@redhat.com> (raw)
In-Reply-To: <20080602123145.GA8258@yantp.cn.ibm.com>
Yan Li wrote:
>> Please could you try if patch here helps and doesn't cause performance degradation?
>> http://www2.kernel.org/pub/linux/kernel/people/agk/patches/2.6/2.6.25/dm-crypt-add-cond_resched.patch
>>
>
> Will the result of testing a Debian 2.6.24-etchnhalf.1-amd64 kernel
> (very near a vanilla kernel) be of same value? Since the data on some
> other drives on this server is important so I dare not try 2.6.25-rc
> on it.
>
patch just adds cond_resched(), problem is the same in all recent kernel I think.
just for 2.6.24 kernel patch need to be slighly modified (see below)
> Following is my test plan, comments are welcomed:
>
> Test command:
> # dd if=/dev/zero of=/dev/mapper/open_device bs=500M count=10
> (this server has 2G memory)
>
bonnie++ test or something like that is more appropriate, but
for this problem is dd test enough
> The command will be run for 3 times, and average speed of last two
> runs will be taken as result score.
>
>
flush caches between tests or simple luksClose & luksOpen + mount device between
test runs
> Dm-crypt LUKS Encryption scenarios:
> aes-cbc-essiv:sha256, keysize 128
> aes-xts-plain, keysize 256
> aes-xts-plain, keysize 512
>
> I will compare the speed of all above 3 encryption scenarios, with and
> without the patch.
>
>
Patch for 2.6.24 kernel
Add cond_resched() to prevent stuck in big bio processing.
Signed-off-by: Milan Broz <mbroz@redhat.com>
---
drivers/md/dm-crypt.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.24.3/drivers/md/dm-crypt.c
===================================================================
--- linux-2.6.24.3.orig/drivers/md/dm-crypt.c 2008-02-26 01:20:20.000000000 +0100
+++ linux-2.6.24.3/drivers/md/dm-crypt.c 2008-03-01 16:46:24.000000000 +0100
@@ -374,6 +374,7 @@ static int crypt_convert(struct crypt_co
break;
ctx->sector++;
+ cond_resched();
}
return r;
WARNING: multiple messages have this Message-ID (diff)
From: Milan Broz <mbroz@redhat.com>
To: Yan Li <elliot.li.tech@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ritesh Raj Sarraf <rrs@researchut.com>,
Christophe Saout <christophe@saout.de>,
linux-kernel@vger.kernel.org, dm-devel@redhat.com,
Herbert Xu <herbert@gondor.apana.org.au>,
rjmaomao@gmail.com, Alasdair G Kergon <agk@redhat.com>,
dm-crypt@saout.de
Subject: Re: 2.6.24 Kernel Soft Lock Up with heavy I/O in dm-crypt
Date: Mon, 02 Jun 2008 14:51:04 +0200 [thread overview]
Message-ID: <4843ECB8.4010002@redhat.com> (raw)
In-Reply-To: <20080602123145.GA8258@yantp.cn.ibm.com>
Yan Li wrote:
>> Please could you try if patch here helps and doesn't cause performance degradation?
>> http://www2.kernel.org/pub/linux/kernel/people/agk/patches/2.6/2.6.25/dm-crypt-add-cond_resched.patch
>>
>
> Will the result of testing a Debian 2.6.24-etchnhalf.1-amd64 kernel
> (very near a vanilla kernel) be of same value? Since the data on some
> other drives on this server is important so I dare not try 2.6.25-rc
> on it.
>
patch just adds cond_resched(), problem is the same in all recent kernel I think.
just for 2.6.24 kernel patch need to be slighly modified (see below)
> Following is my test plan, comments are welcomed:
>
> Test command:
> # dd if=/dev/zero of=/dev/mapper/open_device bs=500M count=10
> (this server has 2G memory)
>
bonnie++ test or something like that is more appropriate, but
for this problem is dd test enough
> The command will be run for 3 times, and average speed of last two
> runs will be taken as result score.
>
>
flush caches between tests or simple luksClose & luksOpen + mount device between
test runs
> Dm-crypt LUKS Encryption scenarios:
> aes-cbc-essiv:sha256, keysize 128
> aes-xts-plain, keysize 256
> aes-xts-plain, keysize 512
>
> I will compare the speed of all above 3 encryption scenarios, with and
> without the patch.
>
>
Patch for 2.6.24 kernel
Add cond_resched() to prevent stuck in big bio processing.
Signed-off-by: Milan Broz <mbroz@redhat.com>
---
drivers/md/dm-crypt.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.24.3/drivers/md/dm-crypt.c
===================================================================
--- linux-2.6.24.3.orig/drivers/md/dm-crypt.c 2008-02-26 01:20:20.000000000 +0100
+++ linux-2.6.24.3/drivers/md/dm-crypt.c 2008-03-01 16:46:24.000000000 +0100
@@ -374,6 +374,7 @@ static int crypt_convert(struct crypt_co
break;
ctx->sector++;
+ cond_resched();
}
return r;
next prev parent reply other threads:[~2008-06-02 12:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-28 13:54 2.6.24 Kernel Soft Lock Up with heavy I/O in dm-crypt Ritesh Raj Sarraf
2008-02-29 7:20 ` Andrew Morton
2008-02-29 7:20 ` Andrew Morton
2008-02-29 18:15 ` Herbert Xu
2008-02-29 18:15 ` Herbert Xu
2008-02-29 18:46 ` Alasdair G Kergon
2008-02-29 18:46 ` [dm-devel] " Alasdair G Kergon
2008-02-29 18:59 ` Ritesh Raj Sarraf
2008-03-01 19:30 ` Milan Broz
2008-03-01 19:30 ` [dm-devel] " Milan Broz
2008-03-01 19:33 ` Milan Broz
2008-03-01 19:33 ` [dm-devel] " Milan Broz
2008-03-01 21:59 ` Gunter Ohrner
2008-03-01 21:59 ` Gunter Ohrner
2008-03-02 7:58 ` Gunter Ohrner
2008-03-02 7:58 ` Gunter Ohrner
2008-03-06 14:41 ` Ritesh Raj Sarraf
2008-03-06 14:41 ` [dm-devel] " Ritesh Raj Sarraf
2008-06-02 3:07 ` Yan Li
2008-06-02 6:52 ` Milan Broz
2008-06-02 6:52 ` Milan Broz
2008-06-02 12:31 ` Yan Li
2008-06-02 12:51 ` Milan Broz [this message]
2008-06-02 12:51 ` Milan Broz
2008-06-05 22:44 ` Yan Li
2008-06-05 22:44 ` Yan Li
2008-06-06 6:46 ` Milan Broz
2008-06-06 6:46 ` Milan Broz
2008-06-03 19:46 ` Ritesh Raj Sarraf
2008-06-03 23:13 ` Yan Li
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=4843ECB8.4010002@redhat.com \
--to=mbroz@redhat.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=christophe@saout.de \
--cc=dm-crypt@saout.de \
--cc=dm-devel@redhat.com \
--cc=elliot.li.tech@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rjmaomao@gmail.com \
--cc=rrs@researchut.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.