<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/lightnvm/pblk-write.c, branch linux-4.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-13T14:34:57Z</updated>
<entry>
<title>lightnvm: pblk: remove I/O dependency on write path</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e82123da6a4c6019ef03bcd47e4b3dc18dd136e'/>
<id>urn:sha1:1e82123da6a4c6019ef03bcd47e4b3dc18dd136e</id>
<content type='text'>
pblk schedules user I/O, metadata I/O and erases on the write path in
order to minimize collisions at the media level. Until now, there has
been a dependency between user and metadata I/Os that could lead to a
deadlock as both take the per-LUN semaphore to schedule submission.

This path removes this dependency and guarantees forward progress at a
per I/O granurality.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: refactor rqd alloc/free</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=67bf26a3220e3bd403a62a9289aa1d065d3db82c'/>
<id>urn:sha1:67bf26a3220e3bd403a62a9289aa1d065d3db82c</id>
<content type='text'>
Refactor the rqd allocation and free functions so that all I/O types can
use these helper functions.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: improve naming for internal req.</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2cddf2082e700218b898b1c899f6a1c2130074a'/>
<id>urn:sha1:e2cddf2082e700218b898b1c899f6a1c2130074a</id>
<content type='text'>
Each request type sent to the LightNVM subsystem requires different
metadata. Until now, we have tailored this metadata based on write, read
and erase commands. However, pblk uses different metadata for internal
writes that do not hit the write buffer. Instead of abusing the metadata
for reads, create a new request type - internal write to improve
code readability.

In the process, create internal values for each I/O type instead of
abusing the READ/WRITE macros, as suggested by Christoph.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: allocate bio size more accurately</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=875d94f3a4838f2243334e5ce55ac8153f9bbf5b'/>
<id>urn:sha1:875d94f3a4838f2243334e5ce55ac8153f9bbf5b</id>
<content type='text'>
Wait until we know the exact number of ppas to be sent to the device,
before allocating the bio.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: put bio on bio completion</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55e836d401601e7903b36db015ce899dc11085ab'/>
<id>urn:sha1:55e836d401601e7903b36db015ce899dc11085ab</id>
<content type='text'>
Simplify put bio by doing it on bio end_io instead of manually putting
it on the completion path.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: remove checks on mempool alloc.</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2942f50fa389a62865572452dce6214a8aed69dc'/>
<id>urn:sha1:2942f50fa389a62865572452dce6214a8aed69dc</id>
<content type='text'>
As part of the mempool audit on pblk, remove unnecessary mempool
allocation checks on mempools.

Reported-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: do not use a mempool for line bitmaps</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e72ec1d31bcb6dffe325418c6d96f2fcab7c2654'/>
<id>urn:sha1:e72ec1d31bcb6dffe325418c6d96f2fcab7c2654</id>
<content type='text'>
pblk holds two sector bitmaps: one to keep track of the mapped sectors
while the line is active and another one to keep track of the invalid
sectors. The latter is kept during the whole live of the line, until it
is recycled. Since we cannot guarantee forward progress for the mempool
in this case, get rid of the mempool and simply allocate memory through
kmalloc.

Reported-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: simplify work_queue mempool</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b84ae4a8b883b96b95fff0e3979ff2c65bbf96b0'/>
<id>urn:sha1:b84ae4a8b883b96b95fff0e3979ff2c65bbf96b0</id>
<content type='text'>
In pblk, we have a mempool to allocate a generic structure that we
pass along workqueues. This is heavily used in the GC path in order
to have enough inflight reads and fully utilize the GC bandwidth.

However, the current GC path copies data to the host memory and puts it
back into the write buffer. This requires a vmalloc allocation for the
data and a memory copy. Thus, guaranteeing the allocation by using a
mempool for the structure in itself does not give us much. Until we
implement support for vector copy to avoid moving data through the host,
just allocate the workqueue structure using kmalloc.

This allows us to have a much smaller mempool.

Reported-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix write I/O sync stat</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0e12a707f02fcde1b77a2417d9fb0ae1ce3b003'/>
<id>urn:sha1:e0e12a707f02fcde1b77a2417d9fb0ae1ce3b003</id>
<content type='text'>
Fix stat counter to collect the right number of I/Os being synced on the
completion path.

Fixes: 0880a9aa2d91f ("lightnvm: pblk: delete redundant buffer pointer")
Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: free padded entries in write buffer</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd8ddbf7a5e206fe6995ab0aee245d597dd6a7f2'/>
<id>urn:sha1:cd8ddbf7a5e206fe6995ab0aee245d597dd6a7f2</id>
<content type='text'>
When a REQ_FLUSH reaches pblk, the bio cannot be directly completed.
Instead, data on the write buffer is flushed and the bio is completed on
the completion pah. This might require some sectors to be padded in
order to guarantee a successful write.

This patch fixes a memory leak on the padded pages. A consequence of
this bad free was that internal bios not containing data (only a flush)
were not being completed.

Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
