<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/lightnvm/pblk-map.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-01-05T15:50:12Z</updated>
<entry>
<title>lightnvm: use internal pblk methods</title>
<updated>2018-01-05T15:50:12Z</updated>
<author>
<name>Matias Bjørling</name>
</author>
<published>2018-01-05T13:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=26f76dce60d28028e5c1fbbc39e771366a27671f'/>
<id>urn:sha1:26f76dce60d28028e5c1fbbc39e771366a27671f</id>
<content type='text'>
Now that rrpc has been removed, the only users of the ppa helpers
is pblk. However, pblk already defines similar functions.

Switch pblk to use the internal ones, and remove the generic ppa
helpers.

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: correct valid lba count calculation</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Hans Holmberg</name>
</author>
<published>2017-10-13T12:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03e868eb8adb28e34f6e695667d230786bfdb653'/>
<id>urn:sha1:03e868eb8adb28e34f6e695667d230786bfdb653</id>
<content type='text'>
During garbage collect, lbas being written can end up
being invalidated. Make sure that this is reflected in
the valid lba count.

Signed-off-by: Hans Holmberg &lt;hans.holmberg@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: enable 1 LUN configuration</title>
<updated>2017-10-13T14:34:57Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-10-13T12:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21d2287119e843929c29fb1adbd271bde1fac7ae'/>
<id>urn:sha1:21d2287119e843929c29fb1adbd271bde1fac7ae</id>
<content type='text'>
Metadata I/Os are scheduled to minimize their impact on user data I/Os.
When there are enough LUNs instantiated (i.e., enough bandwidth), it is
easy to interleave metadata and data one after the other so that
metadata I/Os are the ones being blocked and not vice-versa.

We do this by calculating the distance between the I/Os in terms of the
LUNs that are not in used, and selecting a free LUN that satisfies a
the simple heuristic that metadata is scheduled behind. The per-LUN
semaphores guarantee consistency. This works fine on &gt;1 LUN
configuration. However, when a single LUN is instantiated, this design
leads to a deadlock, where metadata waits to be scheduled on a free LUN.

This patch implements the 1 LUN case by simply scheduling the metadada
I/O after the data I/O. In the process, we refactor the way a line is
replaced to ensure that metadata writes are submitted after data writes
in order to guarantee block sequentiality. Note that, since there is
only one LUN, both I/Os will block each other by design. However, such
configuration only pursues tight read latencies, not write bandwidth.

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 bad le64 assignations</title>
<updated>2017-06-30T17:08:18Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-06-30T15:56:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f417aa0bd8c4b8fd3fecbc23819a994436709dcc'/>
<id>urn:sha1:f417aa0bd8c4b8fd3fecbc23819a994436709dcc</id>
<content type='text'>
Use the right types and conversions on le64 variables. Reported by
sparse.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: fail gracefully on irrec. error</title>
<updated>2017-06-26T22:27:39Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-06-26T09:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=588726d3ec68b66be2e2881d2b85060ff383078a'/>
<id>urn:sha1:588726d3ec68b66be2e2881d2b85060ff383078a</id>
<content type='text'>
Due to user writes being decoupled from media writes because of the need
of an intermediate write buffer, irrecoverable media write errors lead
to pblk stalling; user writes fill up the buffer and end up in an
infinite retry loop.

In order to let user writes fail gracefully, it is necessary for pblk to
keep track of its own internal state and prevent further writes from
being placed into the write buffer.

This patch implements a state machine to keep track of internal errors
and, in case of failure, fail further user writes in an standard way.
Depending on the type of error, pblk will do its best to persist
buffered writes (which are already acknowledged) and close down on a
graceful manner. This way, data might be recovered by re-instantiating
pblk. Such state machine paves out the way for a state-based FTL log.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: delete redundant buffer pointer</title>
<updated>2017-06-26T22:27:39Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-06-26T09:57:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0880a9aa2d91ff5131ecd0902a758afe760b9c1c'/>
<id>urn:sha1:0880a9aa2d91ff5131ecd0902a758afe760b9c1c</id>
<content type='text'>
After refactoring the metadata path, the backpointer controlling
synced I/Os in a line becomes unnecessary; metadata is scheduled
on the write thread, thus we know when the end of the line is reached
and act on it directly.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: sched. metadata on write thread</title>
<updated>2017-06-26T22:27:39Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-06-26T09:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd2a43437337a71c4e26fbbe93a423b731bf69c7'/>
<id>urn:sha1:dd2a43437337a71c4e26fbbe93a423b731bf69c7</id>
<content type='text'>
At the moment, line metadata is persisted on a separate work queue, that
is kicked each time that a line is closed. The assumption when designing
this was that freeing the write thread from creating a new write request
was better than the potential impact of writes colliding on the media
(user I/O and metadata I/O). Experimentation has proven that this
assumption is wrong; collision can cause up to 25% of bandwidth and
introduce long tail latencies on the write thread, which potentially
cause user write threads to spend more time spinning to get a free entry
on the write buffer.

This patch moves the metadata logic to the write thread. When a line is
closed, remaining metadata is written in memory and is placed on a
metadata queue. The write thread then takes the metadata corresponding
to the previous line, creates the write request and schedules it to
minimize collisions on the media. Using this approach, we see that we
can saturate the media's bandwidth, which helps reducing both write
latencies and the spinning time for user writer threads.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: generalize erase path</title>
<updated>2017-06-26T22:24:53Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-06-26T09:57:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d624f371d5c17a6e230ffed3f0371a4eb588bf45'/>
<id>urn:sha1:d624f371d5c17a6e230ffed3f0371a4eb588bf45</id>
<content type='text'>
Erase I/Os are scheduled with the following goals in mind: (i) minimize
LUNs collisions with write I/Os, and (ii) even out the price of erasing
on every write, instead of putting all the burden on when garbage
collection runs. This works well on the current design, but is specific
to the default mapping algorithm.

This patch generalizes the erase path so that other mapping algorithms
can select an arbitrary line to be erased instead. It also gets rid of
the erase semaphore since it creates jittering for user writes.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: spare double cpu_to_le64 calc.</title>
<updated>2017-06-26T22:24:53Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-06-26T09:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=caa69fa560025d12c276abd62d58a87b94324708'/>
<id>urn:sha1:caa69fa560025d12c276abd62d58a87b94324708</id>
<content type='text'>
Spare a double calculation on the fast write path.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix erase counters on error fail</title>
<updated>2017-04-23T22:57:52Z</updated>
<author>
<name>Javier González</name>
</author>
<published>2017-04-21T23:32:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a44f53faf4674d84cba79f7ee574584e18ab8744'/>
<id>urn:sha1:a44f53faf4674d84cba79f7ee574584e18ab8744</id>
<content type='text'>
When block erases fail, these blocks are marked bad. The number of valid
blocks in the line was not updated, which could cause an infinite loop
on the erase path.

Fix this atomic counter and, in order to avoid taking an irq lock on the
interrupt context, make the erase counters atomic too.

Also, in the case that a significant number of blocks become bad in a
line, the result is the double shared metadata buffer (emeta) to stop
the pipeline until all metadata is flushed to the media. Increase the
number of metadata lines from 2 to 4 to avoid this case.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Reviewed-by: Matias Bjørling &lt;matias@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
