<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/lightnvm/pblk-init.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-08-06T14:20:10Z</updated>
<entry>
<title>lightnvm: pblk: use kvmalloc for metadata</title>
<updated>2019-08-06T14:20:10Z</updated>
<author>
<name>Hans Holmberg</name>
</author>
<published>2019-07-31T09:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff8f352070b204ab1721f41339547d897f8120fd'/>
<id>urn:sha1:ff8f352070b204ab1721f41339547d897f8120fd</id>
<content type='text'>
There is no reason now not to use kvmalloc, so replace the internal
metadata allocation scheme.

Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Hans Holmberg &lt;hans@owltronix.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: IO path reorganization</title>
<updated>2019-05-06T16:19:19Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2019-05-04T18:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e03f6322ab2ab055478c92bf7af66d6ab13a35f'/>
<id>urn:sha1:3e03f6322ab2ab055478c92bf7af66d6ab13a35f</id>
<content type='text'>
This patch is made in order to prepare read path for new approach to
partial read handling, which is simpler in compare with previous one.

The most important change is to move the handling of completed and
failed bio from the pblk_make_rq() to particular read and write
functions. This is needed, since after partial read path changes,
sometimes completed/failed bio will be different from original one, so
we cannot do this any longer in pblk_make_rq().

Other changes are small read path refactor in order to reduce the size
of the following patch with partial read changes.

Generally the goal of this patch is not to change the functionality,
but just to prepare the code for the following changes.

Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.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: fix bio leak when bio is split</title>
<updated>2019-05-06T16:19:17Z</updated>
<author>
<name>Chansol Kim</name>
</author>
<published>2019-05-04T18:37:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0503871223b7316caa1d6a78b09c167ceb135dd1'/>
<id>urn:sha1:0503871223b7316caa1d6a78b09c167ceb135dd1</id>
<content type='text'>
For large size io where blk_queue_split needs to be called inside
pblk_rw_io, results in bio leak as bio_endio is not called on the
newly allocated. One way to observe this is to mounting ext4
filesystem on the target and issuing 1MB io with dd, e.g., dd bs=1MB
if=/dev/null of=/mount/myvolume. kmemleak reports:

unreferenced object 0xffff88803d7d0100 (size 256):
  comm "kworker/u16:1", pid 68, jiffies 4294899333 (age 284.120s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 60 e8 31 81 88 ff ff  .........`.1....
    01 40 00 00 06 06 00 00 00 00 00 00 05 00 00 00  .@..............
  backtrace:
    [&lt;000000001f5aa04f&gt;] kmem_cache_alloc+0x204/0x3c0
    [&lt;0000000040945aab&gt;] mempool_alloc_slab+0x1d/0x30
    [&lt;00000000b4959ab4&gt;] mempool_alloc+0x83/0x220
    [&lt;00000000646bad9b&gt;] bio_alloc_bioset+0x229/0x320
    [&lt;000000009264b251&gt;] bio_clone_fast+0x26/0xc0
    [&lt;0000000008250252&gt;] bio_split+0x41/0x110
    [&lt;00000000e365cad0&gt;] blk_queue_split+0x349/0x930
    [&lt;00000000eb5426bc&gt;] pblk_make_rq+0x1b5/0x1f0
    [&lt;00000000eea09cec&gt;] generic_make_request+0x2f9/0x690
    [&lt;00000000ae6acede&gt;] submit_bio+0x12e/0x1f0
    [&lt;00000000f9b8b82a&gt;] ext4_io_submit+0x64/0x80
    [&lt;000000009e4f817d&gt;] ext4_bio_write_page+0x32e/0x890
    [&lt;00000000cbd0d106&gt;] mpage_submit_page+0x65/0xc0
    [&lt;000000000eec7359&gt;] mpage_map_and_submit_buffers+0x171/0x330
    [&lt;000000009a7afcb6&gt;] ext4_writepages+0xd5e/0x1650
    [&lt;000000004476b096&gt;] do_writepages+0x39/0xc0

In case there is a need for a split, blk_queue_split returns the newly
allocated bio to the caller by changing the value of pointer passed as
a reference, while the original is passed to generic_make_requests.

Although pblk_rw_io's local variable bio* has changed and passed to
pblk_submit_read and pblk_write_to_cache, work is done on this new
bio*, and pblk_rw_io returns NVM_IO_DONE, pblk_make_rq calls bio_endio
on the old bio* because it passed bio pointer by value to pblk_rw_io.

pblk_rw_io is unfolded into pblk_make_rq so that there is no copying
of bio* and bio_endio is called on the correct bio*.

Signed-off-by: Chansol Kim &lt;chansol.kim@samsung.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: cleanly fail when there is not enough memory</title>
<updated>2019-05-06T16:19:17Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2019-05-04T18:37:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e46b8b24ffbc4ecb5b606094dbc8ed5d6281f59'/>
<id>urn:sha1:6e46b8b24ffbc4ecb5b606094dbc8ed5d6281f59</id>
<content type='text'>
L2P table can be huge in many cases, since it typically requires 1GB
of DRAM for 1TB of drive. When there is not enough memory available,
OOM killer turns on and kills random processes, which can be very
annoying for users.

This patch changes the flag for L2P table allocation on order to handle
this situation in more user friendly way.

GFP_KERNEL and __GPF_HIGHMEM are default flags used in parameterless
vmalloc() calls, so they are also keeped in that patch. Additionally
__GFP_NOWARN flag is added in order to hide very long dmesg warn in
case of the allocation failures. The most important flag introduced
in that patch is __GFP_RETRY_MAYFAIL, which would cause allocator
to try use free memory and if not available to drop caches, but not
to run OOM killer.

Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Reviewed-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: reduce L2P memory footprint</title>
<updated>2019-05-06T16:19:16Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2019-05-04T18:37:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=847a3a2788c57454ab715e07777431cc5fc76f48'/>
<id>urn:sha1:847a3a2788c57454ab715e07777431cc5fc76f48</id>
<content type='text'>
Currently L2P map size is calculated based on the total number of
available sectors, which is redundant, since it contains mapping for
overprovisioning as well (11% by default).

Change this size to the real capacity and thus reduce the memory
footprint significantly - with default op value it is approx.
110MB of DRAM less for every 1TB of media.

Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Reviewed-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: Switch to use new generic UUID API</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2019-02-11T12:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e0a0847ed7ea02f03dd1442136a0cd684d91218'/>
<id>urn:sha1:7e0a0847ed7ea02f03dd1442136a0cd684d91218</id>
<content type='text'>
There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.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 taking the free lock in in pblk_lines_free</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Hans Holmberg</name>
</author>
<published>2019-02-11T12:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9324980d7300f961e9895ad94d5ea71c0fe187e'/>
<id>urn:sha1:f9324980d7300f961e9895ad94d5ea71c0fe187e</id>
<content type='text'>
pblk_line_meta_free might sleep (it can end up calling vfree, depending
on how we allocate lba lists), and this can lead to a BUG()
if we wake up on a different cpu and release the lock.

As there is no point of grabbing the free lock when pblk has shut down,
remove the lock.

Signed-off-by: Hans Holmberg &lt;hans.holmberg@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: 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: disable interleaved metadata</title>
<updated>2018-12-11T19:22:35Z</updated>
<author>
<name>Igor Konopko</name>
</author>
<published>2018-12-11T19:16:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a16816b9e462e8ee86a908606bde54b53cfeca80'/>
<id>urn:sha1:a16816b9e462e8ee86a908606bde54b53cfeca80</id>
<content type='text'>
Currently pblk only check the size of I/O metadata and does not take
into account if this metadata is in a separate buffer or interleaved
in a single metadata buffer.

In reality only the first scenario is supported, where second mode will
break pblk functionality during any IO operation.

This patch prevents pblk to be instantiated in case device only
supports interleaved 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>
</feed>
