From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wC8nf6R92Jzn for ; Sun, 16 Dec 2012 22:04:22 +0100 (CET) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Sun, 16 Dec 2012 22:04:22 +0100 (CET) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TkLNv-0004zB-Fg for dm-crypt@saout.de; Sun, 16 Dec 2012 22:04:31 +0100 Received: from d67-193-232-12.home3.cgocable.net ([67.193.232.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Dec 2012 22:04:31 +0100 Received: from brian by d67-193-232-12.home3.cgocable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Dec 2012 22:04:31 +0100 From: "Brian J. Murrell" Date: Sun, 16 Dec 2012 16:04:05 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE0D3DDB38A5F15D44A26F2D8" Subject: [dm-crypt] multiple crypt devices not using multiple CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE0D3DDB38A5F15D44A26F2D8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I guess I must be missing something. I had understood that if one had multiple block devices being crypted by dm-crypt, if they were being operated on at the same time, their parallel crypto operations would utilize different CPUs. So I just did the following: # lvcreate -L10G -n t1 vg # cryptsetup --verbose --verify-passphrase luksFormat /dev/vg/t1 # cryptsetup luksOpen /dev/vg/t1 t1-use # dd of=3D/dev/null if=3D/dev/mapper/t1-use bs=3D1M count=3D1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 12.1207 s, 86.5 MB/s observe (a series of) "kworker(s)" each using near 100% of a core to carry out the crypto. I say a series of kworkers since it appears to almost be a "relay" of them, each handing the work of to another and going away. But all in all there is only every near 1 full core's worth running. So now... # lvcreate -L10G -n t2 vg # cryptsetup --verbose --verify-passphrase luksFormat /dev/vg/t2 # cryptsetup luksOpen /dev/vg/t2 t2-use # for ((x=3D1; x<3; x++)); do > dd of=3D/dev/null if=3D/dev/mapper/t$x-use bs=3D1M count=3D1000 & > done [1] 7369 [2] 7370 # 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 27.62 s, 38.0 MB/s 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 27.8015 s, 37.7 MB/s Here I observe two kworker threads each near 50% of a core. Clearly they are both using the same core. But why? As as an aside, aggregate throughput of the two threads is quite a bit less than a single thread. But what I really want to understand is why crypto kworkers are not being scheduled to different, idle cores. Cheers, b. --------------enigE0D3DDB38A5F15D44A26F2D8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlDON0UACgkQl3EQlGLyuXAlBgCg9P4YAXqhibJQn3y1QV5s1Jy4 ylkAn2323qK/HVzne2+SC27ex1+AZOyO =Vp+a -----END PGP SIGNATURE----- --------------enigE0D3DDB38A5F15D44A26F2D8--