<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/lightnvm/pblk.h, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-12-11T19:22:35Z</updated>
<entry>
<title>lightnvm: pblk: do not overwrite ppa list with meta list</title>
<updated>2018-12-11T19:22:35Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2018-12-11T19:16:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c4d5356e64d7d538f24c23045478330fae4a065'/>
<id>urn:sha1:2c4d5356e64d7d538f24c23045478330fae4a065</id>
<content type='text'>
Ehen using pblk with 0 sized metadata both ppa list and meta list
points to the same memory since pblk_dma_meta_size() returns 0 in
that case.

This patch fix that issue by ensuring that pblk_dma_meta_size()
always returns space equal to sizeof(struct pblk_sec_meta) and thus
ppa list and meta list points to different memory address.

Even that in that case drive does not really care about meta_list
pointer, this is the easiest way to fix that issue without introducing
changes in many places in the code just for 0 sized metadata case.

The same approach needs to be also done for pblk_get_sec_meta()
since we also cannot point to the same memory address in meta buffer
when we are using it for pblk recovery process

Reported-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Tested-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: support packed metadata</title>
<updated>2018-12-11T19:22:35Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2018-12-11T19:16:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55d8ec35398e7ab001989473cf6ed6f40b5ef4a6'/>
<id>urn:sha1:55d8ec35398e7ab001989473cf6ed6f40b5ef4a6</id>
<content type='text'>
pblk performs recovery of open lines by storing the LBA in the per LBA
metadata field. Recovery therefore only works for drives that has this
field.

This patch adds support for packed metadata, which store l2p mapping
for open lines in last sector of every write unit and enables drives
without per IO metadata to recover open lines.

After this patch, drives with OOB size &lt;16B will use packed metadata
and metadata size larger than16B will continue to use the device per
IO metadata.

Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: dynamic DMA pool entry size</title>
<updated>2018-12-11T19:22:35Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2018-12-11T19:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24828d0536bbedc9b265f2b01ffca99de3f6a7c7'/>
<id>urn:sha1:24828d0536bbedc9b265f2b01ffca99de3f6a7c7</id>
<content type='text'>
Currently lightnvm and pblk uses single DMA pool, for which the entry
size always is equal to PAGE_SIZE. The contents of each entry allocated
from the DMA pool consists of a PPA list (8bytes * 64), leaving
56bytes * 64 space for metadata. Since the metadata field can be bigger,
such as 128 bytes, the static size does not cover this use-case.

This patch adds support for I/O metadata above 56 bytes by changing DMA
pool size based on device meta size and allows pblk to use OOB metadata
&gt;=16B.

Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: add helpers for OOB metadata</title>
<updated>2018-12-11T19:22:35Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2018-12-11T19:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=faa79f27f0a46cd6c3ac3de5e7f3e142598217fc'/>
<id>urn:sha1:faa79f27f0a46cd6c3ac3de5e7f3e142598217fc</id>
<content type='text'>
pblk currently assumes that size of OOB metadata on drive is always
equal to size of pblk_sec_meta struct. This commit add helpers which will
allow to handle different sizes of OOB metadata on drive in the future.

After this patch only OOB metadata equal to 16 bytes is supported.

Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: move lba list to partial read context</title>
<updated>2018-12-11T19:22:34Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2018-12-11T19:16:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd439496dfbcfee1eb1e0d14984f98acb2b84c16'/>
<id>urn:sha1:dd439496dfbcfee1eb1e0d14984f98acb2b84c16</id>
<content type='text'>
Currently DMA allocated memory is reused on partial read
for lba_list_mem and lba_list_media arrays. In preparation
for dynamic DMA pool sizes we need to move this arrays
into pblk_pr_ctx structures.

Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: set conservative threshold for user writes</title>
<updated>2018-12-11T19:22:33Z</updated>
<author>
<name>Hans Holmberg</name>
</author>
<published>2018-12-11T19:16:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bcebc5bac0935d662f30d317e33ffa660bebf93'/>
<id>urn:sha1:3bcebc5bac0935d662f30d317e33ffa660bebf93</id>
<content type='text'>
In a worst-case scenario (random writes), OP% of sectors
in each line will be invalid, and we will then need
to move data out of 100/OP% lines to free a single line.

So, to prevent the possibility of running out of lines,
temporarily block user writes when there is less than
100/OP% free lines.

Also ensure that pblk creation does not produce instances
with insufficient over provisioning.

Insufficient over-provising is not a problem on real hardware,
but often an issue when running QEMU simulations (with few lines).
100 lines is enough to create a sane instance with the standard
(11%) over provisioning.

Signed-off-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: stop writes gracefully when running out of lines</title>
<updated>2018-12-11T19:22:33Z</updated>
<author>
<name>Hans Holmberg</name>
</author>
<published>2018-12-11T19:16:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=525f7bb2c9f9b2c6673854eade89e98fb3ba7802'/>
<id>urn:sha1:525f7bb2c9f9b2c6673854eade89e98fb3ba7802</id>
<content type='text'>
If mapping fails (i.e. when running out of lines), handle the error
and stop writing.

Signed-off-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: guarantee that backpointer is respected on writer stall</title>
<updated>2018-10-09T14:25:08Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2018-10-09T11:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=766c8ceb16fce904d6b8985ca2c0a547e053d1d5'/>
<id>urn:sha1:766c8ceb16fce904d6b8985ca2c0a547e053d1d5</id>
<content type='text'>
pblk's write buffer must guarantee that it respects the device's
constrains for reads (i.e., mw_cunits). This is done by maintaining a
backpointer that updates the L2P table as entries wrap up, making them
point to the media instead of pointing to the write buffer.

This mechanism can race in case that the write thread stalls, as the
write pointer will protect the last written entry, thus disregarding the
read constrains.

This patch adds an extra check on wrap up, making sure that the
threshold is respected at all times, preventing new entries to overwrite
committed data, also in case of write thread stall.

Reported-by: Heiner Litz &lt;hlitz@ucsc.edu&gt;
Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Heiner Litz &lt;hlitz@ucsc.edu&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: move ring buffer alloc/free rb init</title>
<updated>2018-10-09T14:25:08Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2018-10-09T11:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bd1f875c047a8a619a3e5233c1eb23eace02f31'/>
<id>urn:sha1:9bd1f875c047a8a619a3e5233c1eb23eace02f31</id>
<content type='text'>
pblk's read/write buffer currently takes a buffer and its size and uses
it to create the metadata around it to use it as a ring buffer. This
puts the responsibility of allocating/freeing ring buffer memory on the
ring buffer user. Instead, move it inside of the ring buffer helpers
(pblk-rb.c). This simplifies creation/destruction routines.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: encapsulate rb pointer operations</title>
<updated>2018-10-09T14:25:08Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2018-10-09T11:12:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40b8657dcc0bbd4a293cac1acd4b0b01c0359416'/>
<id>urn:sha1:40b8657dcc0bbd4a293cac1acd4b0b01c0359416</id>
<content type='text'>
pblk's read/write buffer is always a power-of-2, thus wrapping up the
buffer can be done with a bit mask. Since this is an implementation
detail internal to the write buffer, make a helper that hides pointer
increment + wrap, and allows to transparently relax this assumption in
the future.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
