<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/mmc/core/block.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/mmc/core/block.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/mmc/core/block.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-26T13:45:31Z</updated>
<entry>
<title>mmc: core: Re-work the code for eMMC sanitize</title>
<updated>2020-03-26T13:45:31Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2020-03-16T15:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=55c2b8b9a383487f4f083f62d163fe3278fece1a'/>
<id>urn:sha1:55c2b8b9a383487f4f083f62d163fe3278fece1a</id>
<content type='text'>
The error path for sanitize operations that completes with -ETIMEDOUT, is
tightly coupled with the internal request handling code of the core. More
precisely, mmc_wait_for_req_done() checks for specific sanitize errors.
This is not only inefficient as it affects all types of requests, but also
hackish.

Therefore, let's improve the behaviour by moving the error path out of the
mmc core. To do that, retuning needs to be held while running the sanitize
operation.

Moreover, to avoid exporting unnecessary symbols to the mmc block module,
let's move the code into the mmc_ops.c file. While updating the actual
code, let's also take the opportunity to clean up some of the mess around
it.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Link: https://lore.kernel.org/r/20200316152152.15122-1-ulf.hansson@linaro.org
</content>
</entry>
<entry>
<title>mmc: core: Enable re-use of mmc_blk_in_tran_state()</title>
<updated>2020-03-24T13:35:39Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2020-02-04T08:54:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=40c96853fef1bdef13d2cd05b21d4f06b2de6321'/>
<id>urn:sha1:40c96853fef1bdef13d2cd05b21d4f06b2de6321</id>
<content type='text'>
To allow subsequent changes to re-use the code from the static function
mmc_blk_in_tran_state(), let's move it to a public header. While at it,
let's also rename it to mmc_ready_for_data(), as to try to better describe
its purpose.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Tested-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Tested-by: Ludovic Barre &lt;ludovic.barre@st.com&gt;
Reviewed-by: Ludovic Barre &lt;ludovic.barre@st.com&gt;
Link: https://lore.kernel.org/r/20200204085449.32585-7-ulf.hansson@linaro.org
</content>
</entry>
<entry>
<title>mmc: Add MMC host software queue support</title>
<updated>2020-03-24T13:35:39Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2020-02-12T04:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=511ce378e16f07b66ab78118587b7cc6ac197364'/>
<id>urn:sha1:511ce378e16f07b66ab78118587b7cc6ac197364</id>
<content type='text'>
Now the MMC read/write stack will always wait for previous request is
completed by mmc_blk_rw_wait(), before sending a new request to hardware,
or queue a work to complete request, that will bring context switching
overhead and spend some extra time to poll the card for busy completion
for I/O writes via sending CMD13, especially for high I/O per second
rates, to affect the IO performance.

Thus this patch introduces MMC software queue interface based on the
hardware command queue engine's interfaces, which is similar with the
hardware command queue engine's idea, that can remove the context
switching. Moreover we set the default queue depth as 64 for software
queue, which allows more requests to be prepared, merged and inserted
into IO scheduler to improve performance, but we only allow 2 requests
in flight, that is enough to let the irq handler always trigger the
next request without a context switch, as well as avoiding a long latency.

Moreover the host controller should support HW busy detection for I/O
operations when enabling the host software queue. That means, the host
controller must not complete a data transfer request, until after the
card stops signals busy.

From the fio testing data in cover letter, we can see the software
queue can improve some performance with 4K block size, increasing
about 16% for random read, increasing about 90% for random write,
though no obvious improvement for sequential read and write.

Moreover we can expand the software queue interface to support MMC
packed request or packed command in future.

Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/4409c1586a9b3ed20d57ad2faf6c262fc3ccb6e2.1581478568.git.baolin.wang7@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD</title>
<updated>2020-01-24T11:16:05Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2020-01-22T14:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ad91619aa9d78ab1c6d4a969c3db68bc331ae76c'/>
<id>urn:sha1:ad91619aa9d78ab1c6d4a969c3db68bc331ae76c</id>
<content type='text'>
The INAND_CMD38_ARG_EXT_CSD is a vendor specific EXT_CSD register, which is
used to prepare an erase/trim operation. However, it doesn't make sense to
use a timeout of 10 minutes while updating the register, which becomes the
case when the timeout_ms argument for mmc_switch() is set to zero.

Instead, let's use the generic_cmd6_time, as that seems like a reasonable
timeout to use for these cases.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Link: https://lore.kernel.org/r/20200122142747.5690-3-ulf.hansson@linaro.org
</content>
</entry>
<entry>
<title>mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response</title>
<updated>2019-11-13T15:10:16Z</updated>
<author>
<name>Chaotian Jing</name>
<email>chaotian.jing@mediatek.com</email>
</author>
<published>2019-09-05T07:53:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a0d4c7eb71dd08a89ad631177bb0cbbabd598f84'/>
<id>urn:sha1:a0d4c7eb71dd08a89ad631177bb0cbbabd598f84</id>
<content type='text'>
MMC IOCTLS with R1B responses may cause the card to enter the busy state,
which means it's not ready to receive a new request. To prevent new
requests from being sent to the card, use a CMD13 polling loop to verify
that the card returns to the transfer state, before completing the request.

Signed-off-by: Chaotian Jing &lt;chaotian.jing@mediatek.com&gt;
Reviewed-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: Make card_busy_detect() a bit more generic</title>
<updated>2019-11-13T15:10:16Z</updated>
<author>
<name>Chaotian Jing</name>
<email>chaotian.jing@mediatek.com</email>
</author>
<published>2019-09-05T07:53:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3869468e0c4800af52bfe1e0b72b338dcdae2cfc'/>
<id>urn:sha1:3869468e0c4800af52bfe1e0b72b338dcdae2cfc</id>
<content type='text'>
To prepare for more users of card_busy_detect(), let's drop the struct
request * as an in-parameter and convert to log the error message via
dev_err() instead of pr_err().

Signed-off-by: Chaotian Jing &lt;chaotian.jing@mediatek.com&gt;
Reviewed-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into next</title>
<updated>2019-02-28T08:16:18Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2019-02-28T08:16:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=82b6248705cccc4341b4c1d4a80a70f018198db0'/>
<id>urn:sha1:82b6248705cccc4341b4c1d4a80a70f018198db0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mmc: core: align max segment size with logical block size</title>
<updated>2019-02-27T17:01:25Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2019-02-27T16:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c53336c8f5f29043fded57912cc06c24e12613d7'/>
<id>urn:sha1:c53336c8f5f29043fded57912cc06c24e12613d7</id>
<content type='text'>
Logical block size is the lowest possible block size that the storage
device can address. Max segment size is often related with controller's
DMA capability. And it is reasonable to align max segment size with
logical block size.

SDHCI sets un-aligned max segment size, and causes ADMA error, so
fix it by aligning max segment size with logical block size.

Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Cc: Faiz Abbas &lt;faiz_abbas@ti.com&gt;
Cc: linux-block@vger.kernel.org
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Calculate the discard arg only once</title>
<updated>2019-02-25T07:40:58Z</updated>
<author>
<name>Avri Altman</name>
<email>avri.altman@wdc.com</email>
</author>
<published>2019-02-06T11:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=01904ff77676ca6c88e972906ed204a2dfbabab6'/>
<id>urn:sha1:01904ff77676ca6c88e972906ed204a2dfbabab6</id>
<content type='text'>
In MMC, the discard arg is a read-only ext_csd parameter - set it once
on card init. To be consistent, do that for SD as well even though its
discard arg is always 0x0.

Signed-off-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: fix debugfs_simple_attr.cocci warnings</title>
<updated>2019-02-25T07:40:58Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2018-12-29T01:43:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f6a3d9d9dc1c86b75d858ebf011c7fff4b10a9bd'/>
<id>urn:sha1:f6a3d9d9dc1c86b75d858ebf011c7fff4b10a9bd</id>
<content type='text'>
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
for debugfs files.

Semantic patch information:
Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
imposes some significant overhead as compared to
DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
