[dm-devel] [PATCH 8/9] dm crypt: offload writes to thread

Mikulas Patocka mpatocka at redhat.com
Tue Apr 1 18:01:48 UTC 2014



On Tue, 1 Apr 2014, Ondrej Kozina wrote:

> On 03/28/2014 09:11 PM, Mike Snitzer wrote:
> > From: Mikulas Patocka <mpatocka at redhat.com>
> > 
> > Submitting write bios directly in the encryption thread caused serious
> > performance degradation.  On a multiprocessor machine, encryption requests
> > finish in a different order than they were submitted.  Consequently, write
> > requests would be submitted in a different order and it could cause severe
> > performance degradation.
> > (...)
> 
> Hi,
> 
> originally I planed to post result of performance testing but unfortunately I
> crashed the test machine several times with <in_subject> patch applied and
> onward:
> 
> The test set up looks following:
> 
> the base is kernel-3.14-rc8 with applied "[PATCH 2/9] block: use kmalloc
> alignment for bio slab"
> 
> On top of base I compiled various dm-crypt modules:
> 
> <no_patch>		= raw 3.14-rc8 dm-crypt module
> <no_percpu>		= "[PATCH 1/9]"
> <per_bio_data>		= <no_percpu> + "[PATCH 3/9]"
> <unbound>		= <per_bio_data> + "[PATCH 4/9]"
> <dont_allocate_wfix>	= <unbound> + "[PATCH 5/9]" + "[PATCH 6/9]"
> <remove_io_pool>	= <dont_allocate_wfix> + "[PATCH 7/9]"
> <offload>		= <remove_io_pool> + "[PATCH 8/9]"
> <sort>			= <offload> + "[PATCH 9/9]"
> 
> All the modules above went through tests that are available here (originally
> write by Milan Broz, I have made only few modifications):
> 
> http://okozina.fedorapeople.org/dmcrypt-tests.tar.xz
> 
> All tests passed on single device tests with "test_disk" script
> 
> Testing md raid5 backing device ("test_md" script) fails in test
> 2/dmcrypt-all-verify.sh. The failure occurs after it pushes data through
> dm-crypt device using "null" cipher:
> 
> dmsetup create crypt --table "0 </dev/md0 bsize> crypt cipher_null-ecb-null -
> 0 /dev/md0 0"
> 
> steps to reproduce is to load module with <offload> or <sort> dm-crypt
> modules:
> 
> create md raid5 over 3 devices:
> 
> 1) mdadm -C -l 5 -n 3 -c 64 --assume-clean /dev/md0 /dev/sd[xyz]
> 2) run 2/dmcrypt-all-verify.sh

I tried to run "./dmcrypt-all-verify.sh --dev /dev/md0 --testdir 
/mnt/test" and the result was this.

That script is somehow buggy because it attempts to copy files that I have 
in /usr/src to the test filesystem. It fills up the test filesystem and 
fails. I don't know why is it trying to copy files not related to the test.

cp: nelze vytvoøit obyèejný soubor ,,/mnt/test/tst/usr/src/patch-3.5.xz": 
Na zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/rpm" nelze vytvoøit: Na zaøízení není 
volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.5.2.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/cryptsetup-1.6.3.tar.bz2": Na zaøízení není volné 
místo
cp: nelze vytvoøit obyèejný soubor ,,/mnt/test/tst/usr/src/patch-3.12.xz": 
Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/dm-raid5-release.patch": Na zaøízení není volné 
místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.14-rc6" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-2.6.39" nelze vytvoøit: Na 
zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/openssh-6.1p1.tar.gz": Na zaøízení není volné 
místo
cp: adresáø ,,/mnt/test/tst/usr/src/LVM2.2.02.98-test" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.10" nelze vytvoøit: Na 
zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.14-rc4.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.14-rc8.xz": Na zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/gcc-4.7.3-build64" nelze vytvoøit: Na 
zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/binutils-2.23.2.tar.bz2": Na zaøízení není volné 
místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.2.7" nelze vytvoøit: Na 
zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/fio-2.0.15.tar.bzip.bz2": Na zaøízení není volné 
místo
cp: adresáø ,,/mnt/test/tst/usr/src/fio-2.0.15" nelze vytvoøit: Na 
zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/gcc-4.7.3.tar.bz2": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor ,,/mnt/test/tst/usr/src/patch-3.9.xz": 
Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor ,,/mnt/test/tst/usr/src/lvm.tar.gz": Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/gcc-4.6.3-build-arm" nelze vytvoøit: 
Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.9.2.xz": Na zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.14" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.9.3-no-quota" nelze vytvoøit: 
Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.9.3-4.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.9.5-6.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.9.7-8.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.10.4.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.10.8.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.10.8-9.xz": Na zaøízení není volné místo
cp: nelze vytvoøit obyèejný soubor 
,,/mnt/test/tst/usr/src/patch-3.11.3.xz": Na zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.3" nelze vytvoøit: Na zaøízení 
není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.5.4" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.7.2" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.9.4" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/src/linux-3.9.8" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/local" nelze vytvoøit: Na zaøízení není 
volné místo
cp: adresáø ,,/mnt/test/tst/usr/hppa64-linux-gnu" nelze vytvoøit: Na 
zaøízení není volné místo
cp: adresáø ,,/mnt/test/tst/usr/X11R6" nelze vytvoøit: Na zaøízení není 
volné místo
cp: adresáø ,,/mnt/test/tst/usr/hppa64-linux" nelze vytvoøit: Na zaøízení 
není volné místo
cp: adresáø ,,/mnt/test/tst/usr/man" nelze vytvoøit: Na zaøízení není 
volné místo
cp: nelze vytvoøit obyèejný soubor ,,/mnt/test/tst/usr/patch-3.9-rc7.xz": 
Na zaøízení není volné místo
## 0 STACKTRACE() called from ./dmcrypt-all-verify.sh:116
## 1 c_usr_verify() called from ./dmcrypt-all-verify.sh:167
## 2 run_test() called from ./dmcrypt-all-verify.sh:256

Mikulas


More information about the dm-devel mailing list