<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/lightnvm/rrpc.c, branch linux-4.5.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>lightnvm: update closed list outside of intr context</title>
<updated>2016-05-11T09:21:27+00:00</updated>
<author>
<name>Javier González</name>
<email>javier@cnexlabs.com</email>
</author>
<published>2016-02-20T07:52:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3ebb655a6aa716086e1234b37683c8091832a4f0'/>
<id>3ebb655a6aa716086e1234b37683c8091832a4f0</id>
<content type='text'>
commit 6adb03de406e8c92579c2e4b11640841fa908277 upstream.

When an I/O finishes, full blocks are moved from the open to the closed
list - a lock is taken to protect the list. This happens at the moment
in the interrupt context, which is not correct.

This patch moves this logic to the block workqueue instead, avoiding
holding a spinlock without interrupt save in an interrupt context.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Fixes: ff0e498bfa18 ("lightnvm: manage open and closed blocks sepa...")
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6adb03de406e8c92579c2e4b11640841fa908277 upstream.

When an I/O finishes, full blocks are moved from the open to the closed
list - a lock is taken to protect the list. This happens at the moment
in the interrupt context, which is not correct.

This patch moves this logic to the block workqueue instead, avoiding
holding a spinlock without interrupt save in an interrupt context.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Fixes: ff0e498bfa18 ("lightnvm: manage open and closed blocks sepa...")
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: put bio before return</title>
<updated>2016-02-04T16:19:45+00:00</updated>
<author>
<name>Wenwei Tao</name>
<email>ww.tao0320@gmail.com</email>
</author>
<published>2016-02-04T14:13:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=16c6d048d7b74249a4387700887e8adb13028866'/>
<id>16c6d048d7b74249a4387700887e8adb13028866</id>
<content type='text'>
The bio is not returned if the data page cannot be allocated.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bio is not returned if the data page cannot be allocated.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: manage open and closed blocks separately</title>
<updated>2016-01-12T15:21:17+00:00</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2016-01-12T06:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ff0e498bfa185fad5e86c4c7a2db4f9648d2344f'/>
<id>ff0e498bfa185fad5e86c4c7a2db4f9648d2344f</id>
<content type='text'>
LightNVM targets need to know the state of the flash block when doing
flash optimizations. An example is implementing a write buffer to
respect the flash page size. Currently, block state is not accounted
for; the media manager only differentiates among free, bad and in-use
blocks.

This patch adds the logic in the generic media manager to enable
targets manage blocks into open and close separately, and it implements
such management in rrpc. It also adds a set of flags to describe the
state of the block (open, closed, free, bad).

In order to avoid taking two locks (nvm_lun and rrpc_lun) consecutively,
we introduce lockless get_/put_block primitives so that the open and
close list locks and future common logic is handled within the nvm_lun
lock.

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@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LightNVM targets need to know the state of the flash block when doing
flash optimizations. An example is implementing a write buffer to
respect the flash page size. Currently, block state is not accounted
for; the media manager only differentiates among free, bad and in-use
blocks.

This patch adds the logic in the generic media manager to enable
targets manage blocks into open and close separately, and it implements
such management in rrpc. It also adds a set of flags to describe the
state of the block (open, closed, free, bad).

In order to avoid taking two locks (nvm_lun and rrpc_lun) consecutively,
we introduce lockless get_/put_block primitives so that the open and
close list locks and future common logic is handled within the nvm_lun
lock.

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@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: reference rrpc lun in rrpc block</title>
<updated>2016-01-12T15:21:17+00:00</updated>
<author>
<name>Javier González</name>
<email>javier@javigon.com</email>
</author>
<published>2016-01-12T06:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d7a64d275b39e19c010cdfd8728cc64f14b59bda'/>
<id>d7a64d275b39e19c010cdfd8728cc64f14b59bda</id>
<content type='text'>
Currently, a rrpc block only points to its nvm_lun. If a user wants to
find the associated rrpc lun, it will have to calculate the index and
look it up manually. By referencing the rrpc lun directly, this step can
be omitted, at the cost of a larger memory footprint.

This is important for upcoming patches that implement write buffering in
rrpc.

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@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, a rrpc block only points to its nvm_lun. If a user wants to
find the associated rrpc lun, it will have to calculate the index and
look it up manually. By referencing the rrpc lun directly, this step can
be omitted, at the cost of a larger memory footprint.

This is important for upcoming patches that implement write buffering in
rrpc.

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@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: move rq-&gt;error to nvm_rq-&gt;error</title>
<updated>2016-01-12T15:21:17+00:00</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-01-12T06:49:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=72d256ecc5d0c8cbcc0bd5c6d983b434df556cb4'/>
<id>72d256ecc5d0c8cbcc0bd5c6d983b434df556cb4</id>
<content type='text'>
Instead of passing request error into the LightNVM modules, incorporate
it into the nvm_rq.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of passing request error into the LightNVM modules, incorporate
it into the nvm_rq.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: move the pages per block check out of the loop</title>
<updated>2016-01-12T15:21:17+00:00</updated>
<author>
<name>Wenwei Tao</name>
<email>ww.tao0320@gmail.com</email>
</author>
<published>2016-01-12T06:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4b79beb4c36d697e940e9f70d72399c71230a418'/>
<id>4b79beb4c36d697e940e9f70d72399c71230a418</id>
<content type='text'>
There is no need to check whether dev's pages per block is
beyond rrpc support every time we init a lun, we only need
to check it once before enter the lun init loop.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no need to check whether dev's pages per block is
beyond rrpc support every time we init a lun, we only need
to check it once before enter the lun init loop.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: fix locking and mempool in rrpc_lun_gc</title>
<updated>2016-01-12T15:21:16+00:00</updated>
<author>
<name>Wenwei Tao</name>
<email>ww.tao0320@gmail.com</email>
</author>
<published>2016-01-12T06:49:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b262924be03d5d2ae735bc9a4b37eb2c613f61f8'/>
<id>b262924be03d5d2ae735bc9a4b37eb2c613f61f8</id>
<content type='text'>
This patch fix two issues in rrpc_lun_gc

1. prio_list is protected by rrpc_lun's lock not nvm_lun's, so
acquire rlun's lock instead of lun's before operate on the list.

2. we delete block from prio_list before allocating gcb, but gcb
allocation may fail, we end without putting it back to the list,
this makes the block won't get reclaimed in the future. To solve
this issue, delete block after gcb allocation.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fix two issues in rrpc_lun_gc

1. prio_list is protected by rrpc_lun's lock not nvm_lun's, so
acquire rlun's lock instead of lun's before operate on the list.

2. we delete block from prio_list before allocating gcb, but gcb
allocation may fail, we end without putting it back to the list,
this makes the block won't get reclaimed in the future. To solve
this issue, delete block after gcb allocation.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: put block back to gc list on its reclaim fail</title>
<updated>2016-01-12T15:21:16+00:00</updated>
<author>
<name>Wenwei Tao</name>
<email>ww.tao0320@gmail.com</email>
</author>
<published>2016-01-12T06:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d0ca798f960ad7d86f5186fe312c131d00563eb7'/>
<id>d0ca798f960ad7d86f5186fe312c131d00563eb7</id>
<content type='text'>
We delete a block from the gc list before reclaim it, so
put it back to the list on its reclaim fail, otherwise
this block will not get reclaimed and be programmable
in the future.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We delete a block from the gc list before reclaim it, so
put it back to the list on its reclaim fail, otherwise
this block will not get reclaimed and be programmable
in the future.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: check bi_error in gc</title>
<updated>2016-01-12T15:21:16+00:00</updated>
<author>
<name>Wenwei Tao</name>
<email>ww.tao0320@gmail.com</email>
</author>
<published>2016-01-12T06:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2b11c1b24e50a26d435f1d59955f1268053623b7'/>
<id>2b11c1b24e50a26d435f1d59955f1268053623b7</id>
<content type='text'>
We should check last io completion status before
starting another one.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should check last io completion status before
starting another one.

Signed-off-by: Wenwei Tao &lt;ww.tao0320@gmail.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lightnvm: refactor end_io functions for sync</title>
<updated>2016-01-12T15:21:16+00:00</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-01-12T06:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=91276162de9476b8ff32d9452e849210e5dd09e9'/>
<id>91276162de9476b8ff32d9452e849210e5dd09e9</id>
<content type='text'>
To implement sync I/O support within the LightNVM core, the end_io
functions are refactored to take an end_io function pointer instead of
testing for initialized media manager, followed by calling its end_io
function.

Sync I/O can then be implemented using a callback that signal I/O
completion. This is similar to the logic found in blk_to_execute_io().
By implementing it this way, the underlying device I/Os submission logic
is abstracted away from core, targets, and media managers.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To implement sync I/O support within the LightNVM core, the end_io
functions are refactored to take an end_io function pointer instead of
testing for initialized media manager, followed by calling its end_io
function.

Sync I/O can then be implemented using a callback that signal I/O
completion. This is similar to the logic found in blk_to_execute_io().
By implementing it this way, the underlying device I/Os submission logic
is abstracted away from core, targets, and media managers.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
