<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/drivers/md/dm-crypt.c, branch o-8.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=o-8.1</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=o-8.1'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2017-12-27T15:10:45+00:00</updated>
<entry>
<title>dm-crypt: remove io_pool</title>
<updated>2017-12-27T15:10:45+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-29T22:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=1cd7751f5019462e13f8a0927a2954cae9801755'/>
<id>urn:sha1:1cd7751f5019462e13f8a0927a2954cae9801755</id>
<content type='text'>
Remove io_pool and _crypt_io_pool because they are unused.

CRs-fixed: 670391
Change-Id: I71400ecda66902c56c3af981e8b739f156db1e27
Signed-off-by: Mikulas Patocka &lt;mpatock@redhat.com&gt;
Patch-mainline: dm-devel @ 04/05/14, 14:08
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>dm-crypt: sort writes</title>
<updated>2017-12-27T15:10:45+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-29T22:08:22+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f9112079646b56711b170d8c9ccb74f2c029c20a'/>
<id>urn:sha1:f9112079646b56711b170d8c9ccb74f2c029c20a</id>
<content type='text'>
Write requests are sorted in a red-black tree structure and are submitted
in the sorted order.

In theory the sorting should be performed by the underlying disk scheduler,
however, in practice the disk scheduler accepts and sorts only 128 requests.
In order to sort more requests, we need to implement our own sorting.

CRs-fixed: 670391
Change-Id: Iffd9345fa1253f5cf2a556893ed36e08f1ac51aa
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Patch-mainline: dm-devel @ 04/05/14, 14:09
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>dm-crypt: offload writes to thread</title>
<updated>2017-12-27T15:10:45+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-29T22:07:19+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b91d173120748ecab57a8238bde2d946aac03778'/>
<id>urn:sha1:b91d173120748ecab57a8238bde2d946aac03778</id>
<content type='text'>
Submitting write bios directly in the encryption thread caused serious
performance degradation. On multiprocessor machine encryption requests
finish in a different order than they were submitted in. Consequently, write
requests would be submitted in a different order and it could cause severe
performance degradation.

This patch moves submitting write requests to a separate thread so that
the requests can be sorted before submitting.

Sorting is implemented in the next patch.

Note: it is required that a previous patch "dm-crypt: don't allocate pages
for a partial request." is applied before applying this patch. Without
that, this patch could introduce a crash.

CRs-fixed: 670391
Change-Id: I886ed2da0ff174d3539ea18e27170d7fd1062680
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Patch-mainline: dm-devel @ 04/05/14, 14:08
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>dm-crypt: avoid deadlock in mempools</title>
<updated>2017-12-27T15:10:45+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-29T22:03:12+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=1ff0880b231ccebf43eeadefebffbbd0b4c693ec'/>
<id>urn:sha1:1ff0880b231ccebf43eeadefebffbbd0b4c693ec</id>
<content type='text'>
This patch fixes a theoretical deadlock introduced in the previous patch.

The function crypt_alloc_buffer may be called concurrently. If we allocate
from the mempool concurrently, there is a possibility of deadlock.
For example, if we have mempool of 256 pages, two processes, each wanting 256,
pages allocate from the mempool concurrently, it may deadlock in a situation
where both processes have allocated 128 pages and the mempool is exhausted.

In order to avoid this scenarios, we allocate the pages under a mutex.

In order to not degrade performance with excessive locking, we try
non-blocking allocations without a mutex first and if it fails, we fallback
to a blocking allocation with a mutex.

CRs-fixed: 670391
Change-Id: I6c391dece4ba44fe0b2e9b75ea2b9235bf1b525b
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Patch-mainline: dm-devel @ 04/05/14, 14:07
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>dm-crypt: don't allocate pages for a partial request</title>
<updated>2017-12-27T15:10:45+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-29T22:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=c9367e69bf3b7f24512006654f4a3a83200c1292'/>
<id>urn:sha1:c9367e69bf3b7f24512006654f4a3a83200c1292</id>
<content type='text'>
This patch changes crypt_alloc_buffer so that it always allocates pages for
a full request.

This change enables further simplification and removing of one refcounts
in the next patches.

Note: the next patch is needed to fix a theoretical deadlock

CRs-fixed: 670391
Change-Id: I7bcadac8b3450976366c701fceb1fee7cb18df85
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
[joonwoop@codeaurora.org: resolve trivial merge conflicts]
Patch-mainline: dm-devel @ 04/05/14, 14:07
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>dm-crypt: use per-bio data</title>
<updated>2017-12-27T15:10:45+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-29T21:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=d876beb46bfa38fd18c898296024f65356e76cbf'/>
<id>urn:sha1:d876beb46bfa38fd18c898296024f65356e76cbf</id>
<content type='text'>
This patch changes dm-crypt so that it uses auxiliary data allocated with
the bio.

Dm-crypt requires two allocations per request - struct dm_crypt_io and
struct ablkcipher_request (with other data appended to it). It used
mempool for the allocation.

Some requests may require more dm_crypt_ios and ablkcipher_requests,
however most requests need just one of each of these two structures to
complete.

This patch changes it so that the first dm_crypt_io and ablkcipher_request
and allocated with the bio (using target per_bio_data_size option). If the
request needs additional values, they are allocated from the mempool.

CRs-fixed: 670391
Change-Id: I8abc48a021391398f3b35bdd4ac9efbbec3a9fa5
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Patch-mainline: dm-devel @ 04/05/14, 14:05
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>dm-crypt: run in a WQ_HIGHPRI workqueue</title>
<updated>2017-12-27T14:45:03+00:00</updated>
<author>
<name>Tim Murray</name>
<email>timmurray@google.com</email>
</author>
<published>2016-01-20T00:33:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=a8c2d1dac71347011c1494fb611dc303d2bdf441'/>
<id>urn:sha1:a8c2d1dac71347011c1494fb611dc303d2bdf441</id>
<content type='text'>
Running dm-crypt in a standard workqueue results in IO competing for CPU
time with standard user apps, which can lead to pipeline bubbles and
seriously degraded performance. Move to a WQ_HIGHPRI workqueue to
protect against that.

bug 25392275

Change-Id: I589149a31c7b5d322fe2ed5b2476b1f6e3d5ee6f
</content>
</entry>
<entry>
<title>dm-crypt: use unbound workqueue for request processing</title>
<updated>2017-12-27T14:45:03+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-29T21:56:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=49bb1e4d78c2546bdba0a28679fe8718bfe88539'/>
<id>urn:sha1:49bb1e4d78c2546bdba0a28679fe8718bfe88539</id>
<content type='text'>
Use unbound workqueue so that work is automatically ballanced between
available CPUs.

CRs-fixed: 670391
Change-Id: I169099d0b5b27535633c9d3aaab2037b5fea6aa9
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
[joonwoop@codeaurora.org: resolve trivial merge conflict]
Patch-mainline: dm-devel @ 04/05/14, 14:06
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>dm crypt: mark key as invalid until properly loaded</title>
<updated>2017-07-02T17:38:49+00:00</updated>
<author>
<name>Ondrej Kozina</name>
<email>okozina@redhat.com</email>
</author>
<published>2016-11-02T14:02:08+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=9c11334a73277d22450bc95e19de9a3fe6cea840'/>
<id>urn:sha1:9c11334a73277d22450bc95e19de9a3fe6cea840</id>
<content type='text'>
commit 265e9098bac02bc5e36cda21fdbad34cb5b2f48d upstream.

In crypt_set_key(), if a failure occurs while replacing the old key
(e.g. tfm-&gt;setkey() fails) the key must not have DM_CRYPT_KEY_VALID flag
set.  Otherwise, the crypto layer would have an invalid key that still
has DM_CRYPT_KEY_VALID flag set.

Signed-off-by: Ondrej Kozina &lt;okozina@redhat.com&gt;
Reviewed-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>first commit</title>
<updated>2016-08-15T02:19:42+00:00</updated>
<author>
<name>Meizu OpenSource</name>
<email>patchwork@meizu.com</email>
</author>
<published>2016-08-15T02:19:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=d2e1446d81725c351dc73a03b397ce043fb18452'/>
<id>urn:sha1:d2e1446d81725c351dc73a03b397ce043fb18452</id>
<content type='text'>
</content>
</entry>
</feed>
