> On 8 May 2017, at 16.13, Jens Axboe <ax...@fb.com> wrote:
>
> On 05/08/2017 07:44 AM, Javier González wrote:
>>> On 8 May 2017, at 14.27, Ming Lei <ming@redhat.com> wrote:
>>>
>>> On Mon, May 08, 2017 at 01:54:58PM +0200, Javier González wr
> On 8 May 2017, at 14.27, Ming Lei <ming@redhat.com> wrote:
>
> On Mon, May 08, 2017 at 01:54:58PM +0200, Javier González wrote:
>> Hi,
>>
>> I find an unusual added latency(~20-30ms) on blk_queue_enter when
>> allocating a request directly from the NV
As part of the mempool audit on pblk, remove unnecessary mempool
allocation checks on mempools.
Reported-by: Jens Axboe <ax...@kernel.dk>
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 4
drivers/lightnvm/pblk-read.c | 8 -
Since read and erase paths offer different guarantees for inflight I/Os,
separate the mempools to set the right min_nr for each on creation.
Reported-by: Jens Axboe <ax...@kernel.dk>
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 12 -
, get rid of the mempool and simply allocate memory through
kmalloc.
Reported-by: Jens Axboe <ax...@kernel.dk>
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 26 ++
drivers/lightnvm/pblk-ini
in early versions of pblk.
[1] https://patchwork.kernel.org/patch/9940973/
Javier González (5):
lightnvm: pblk: fix min size for page mempool
lightnvm: pblk: simplify work_queue mempool
lightnvm: pblk: decouple read/erase mempools
lightnvm: pblk: do not use a mempool for line bitmaps
lightnvm
the maximum number
of sectors supported by NVMe (as of the time for this patch). Instead,
use the maximum number of allowed sectors reported by the device.
Reported-by: Jens Axboe <ax...@kernel.dk>
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 6 +++
kmalloc.
This allows us to have a much smaller mempool.
Reported-by: Jens Axboe <ax...@kernel.dk>
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 13 +++--
drivers/lightnvm/pblk-gc.c| 32
drivers/l
Make sure that the variable controlling block threshold for allocating
extra metadata sectors in case of a line with bad blocks does not get a
negative value. Otherwise, the line will be marked as corrupted and
wasted.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/li
the existing line
reference to decide when a line is eligible for being freed after the
recycle process.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 56 ++
drivers/lightnvm/pblk-init.c | 14 +++--
drivers/lightnvm/pblk-
is an extra copy on the DMA region on
the device and an extra comparison in the host, given that (i) the OOB
area is being read together with the data in the media, and (ii) the DMA
region allocated for the ppa list can be reused for the metadata stored
on the OOB area.
Signed-off-by: Javier González
tes
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 <jav...@cnexlabs.com>
---
drivers/lightnvm/pb
the invalid bitmap accessible even when the
line is being recycled. When recycled data is being remapped, it is
enough to check the invalid bitmap for the line before updating the L2P
table.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-cache.c | 20 +--
d
Refactor lba sanity check on read path to avoid code duplication.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-read.c | 29 ++---
1 file changed, 10 insertions(+), 19 deletions(-)
diff --git a/drivers/lightnvm/pblk-read.c b/d
Normalize the way we name ppa variables to improve code readability.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 48 +++-
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/drivers/lightnv
this dependency and guarantees forward progress at a
per I/O granurality.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-write.c | 145 +++---
1 file changed, 65 insertions(+), 80 deletions(-)
diff --git a/drivers/lightnv
A partial read I/O in pblk is an I/O where some sectors reside in the
write buffer in main memory and some are persisted on the device. Such
an I/O must at least contain 2 lbas, therefore checking for the case
where a single lba is mapped is not necessary.
Signed-off-by: Javier González <
, 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 <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c
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 <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 10 +++---
drivers/lightnvm/pblk-read.c | 1 -
drivers/lightnvm/pblk-recovery.c | 1 -
d
This patchset is a general cleanup to improve code readability.
Javier González (11):
lightnvm: pblk: use constant for GC max inflight
lightnvm: pblk: normalize ppa namings
lightnvm: pblk: refactor read lba sanity check
lightnvm: pblk: simplify data validity check on GC
lightnvm: pblk
Use a constant to set the maximum number of inflight GC requests
allowed.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-gc.c | 4 ++--
drivers/lightnvm/pblk.h| 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/lightnvm/pblk-
Simplify the part of the garbage collector where data is read from the
line being recycled and moved into an internal queue before being copied
to the memory buffer. This allows to get rid of a dedicated function,
which introduces an unnecessary dependency on the code.
Signed-off-by: Javier
Refactor the rqd allocation and free functions so that all I/O types can
use these helper functions.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 40 ++--
drivers/lightnvm/pblk-read.c | 2 --
drivers/li
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 <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-rb.c| 5 +++--
drivers/lightnvm/pblk-write.c | 20 ++--
drivers/lightnvm/pblk.h | 4 +
For consistency with the rest of pblk, use rqd->end_io to point to the
function taking care of ending the request on the completion path.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 7 ---
drivers/lightnvm/pblk-read.c | 5 ++---
2 files c
-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-cache.c | 4 +++-
drivers/lightnvm/pblk-rb.c| 8 +---
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/lightnvm/pblk-cache.c b/drivers/lightnvm/pblk-cache.c
index 1d6b8e3585f1..0d227ef7d1b9
> On 21 Sep 2017, at 13.26, Rakesh Pandit wrote:
>
> This usually happens if we are developing with qemu and ll2pmode has
> default value. Even in that case message seems wrong.
>
> Signed-off-by: Rakesh Pandit
> ---
> drivers/lightnvm/pblk-init.c | 2 +-
> On 22 Sep 2017, at 11.42, Rakesh Pandit <rak...@tuxera.com> wrote:
>
> On Fri, Sep 22, 2017 at 10:40:57AM +0200, Javier González wrote:
>>> On 21 Sep 2017, at 13.25, Rakesh Pandit wrote:
>>>
>>> This is a trivial change which reuses pblk_gc_sho
Sure.
Matias: Can you fix this when picking it up?
Javier
> On 22 Sep 2017, at 11.44, Rakesh Pandit <rak...@tuxera.com> wrote:
>
> On Fri, Sep 22, 2017 at 10:52:19AM +0200, Javier González wrote:
>>> On 21 Sep 2017, at 13.26, Rakesh Pandit <rak...@tuxera.com>
pr_err("pblk: taking lun semaphore timed out: err %d\n", -ret);
> }
>
> void pblk_down_page(struct pblk *pblk, struct ppa_addr *ppa_list, int nr_ppas)
> --
> 2.5.0
Looks good.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
}
>
> diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
> index eaf5397..87b1d7f 100644
> --- a/drivers/lightnvm/pblk.h
> +++ b/drivers/lightnvm/pblk.h
> @@ -318,6 +318,7 @@ enum {
> };
>
> #define PBLK_MAGIC 0x70626c6b /*pblk*/
> +#define SMETA_VERSI
> On 21 Sep 2017, at 13.25, Rakesh Pandit wrote:
>
> This is a trivial change which reuses pblk_gc_should_kick instead of
> repeating it again in pblk_rl_free_lines_inc.
>
> Signed-off-by: Rakesh Pandit
> ---
> drivers/lightnvm/pblk-core.c | 1 +
>
itmap));
> + spin_lock(>lock);
> }
>
> u64 __pblk_alloc_page(struct pblk *pblk, struct pblk_line *line, int nr_secs)
> --
> 2.5.0
Looks good. The reason not to have locks here was that the caller is
always on the write thread - who did the allocation -, since it is error
handlin
; info->tgtsize = tgt_iter;
> - up_write(_lock);
> + up_write(_tgtt_lock);
>
> if (copy_to_user(arg, info, sizeof(struct nvm_ioctl_info))) {
> kfree(info);
> --
> 2.7.4
LGTM.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
dev_map = kmalloc(sizeof(struct nvm_dev_map), GFP_KERNEL);
> --
> 2.7.4
We wanted to make sure that nr_chnls was really, really set :)
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
++)
> + while (--i >= 0)
> kfree(l_mg->sline_meta[i]);
It is safe to use kfree on NULL pointers. No need to do this. You can
either send a new patch, or we can change it when picking it up.
>
> return -ENOMEM;
> --
> 2.5.0
Rest looks good.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
Make LightNVM passhtrough commands fail fast. User space will then take
care of re-submitting.
Fixes: 84d4add793c6 ('lightnvm: add ioctls for vector I/Os')
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/nvme/host/lightnvm.c | 2 --
1 file changed, 2 deletions(-)
diff
> On 6 Oct 2017, at 11.20, Andrey Ryabinin wrote:
>
> On 10/05/2017 11:35 AM, Hans Holmberg wrote:
>> From: Hans Holmberg
>>
>> Lockdep complains about being in atomic context while freeing line
>> metadata - and rightly so as we take a
Implement a generic path for sending sync I/O on LightNVM. This allows
to reuse the standard synchronous path trough blk_execute_rq(), instead
of implementing a wait_for_completion on the target side (e.g., pblk).
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/
wait_for_completion()
constructions to implement sync. I/O, both on pblk and at the subsystem
level. One of the main issues - besides code replication - is that we
could not benefit from improvements on blk_execute_rq to prevent hangs.
This should fix it.
Javier González (2):
lightnvm: fail fast
> On 21 Sep 2017, at 13.26, Rakesh Pandit wrote:
>
> It seems pblk_dealloc_page would race against pblk_alloc_pages for
> line bitmap for sector allocation. The chances are very low but might
> as well protect the bitmap properly. It's not even in fast path.
>
>
> On 6 Oct 2017, at 19.43, Bart Van Assche wrote:
>
> On Fri, 2017-10-06 at 19:35 +0200, Christoph Hellwig wrote:
>> On Fri, Oct 06, 2017 at 10:23:53AM -0700, Bart Van Assche wrote:
>>> The purpose of patch "linux/types.h: enable endian checks for all
>>> sparse builds"
Cleanup up unused and static functions across the whole codebase.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 133 ---
drivers/lightnvm/pblk-gc.c | 40 ++---
drivers/lightnvm/pblk-rl.c
balancing the outstanding read GC I/Os to be reported
as "hung", though the behavior is normal.
Solve this by allowing to schedule when we detect that the read GC path
is not moving forward.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
drivers/lightnvm/pblk-gc.c | 8
Two small patches extra for 4.15
The first one is a general cleanup. The second one is an easy fix to
avoid being reported as a hung task when GC is rate-limited
Javier González (2):
lightnvm: pblk: cleanup unused and static functions
lightnvm: pblk: avoid being reported as hung on rated GC
> On 13 Oct 2017, at 17.35, Rakesh Pandit wrote:
>
>> On Fri, Oct 13, 2017 at 07:58:09AM -0700, Christoph Hellwig wrote:
>>> On Fri, Oct 13, 2017 at 02:45:51PM +0200, Matias Bjørling wrote:
>>> From: Rakesh Pandit
>>>
>>> When a virtual block device is
> On 13 Oct 2017, at 17.58, Javier González <javigon.naps...@gmail.com> wrote:
>
>
>>> On 13 Oct 2017, at 17.35, Rakesh Pandit <rak...@tuxera.com> wrote:
>>>
>>>> On Fri, Oct 13, 2017 at 07:58:09AM -0700, Christoph Hellwig wrote:
>>>
> On 7 Sep 2017, at 13.08, Christoph Hellwig <h...@infradead.org> wrote:
>
> On Wed, Sep 06, 2017 at 04:00:56PM +0200, Javier González wrote:
>>> Nope. You want to loop over vmalloc_to_page and call bio_add_page
>>> for each page,
>>
>> Yes. This
Export symbol for bio_copy_kern so that we can use it in modules.
Reported-by: Andiry Xu <t-jia...@microsoft.com>
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
block/bio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/bio.c b/block/bio.c
index 6745759028da..
-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-cache.c | 4 +++-
drivers/lightnvm/pblk-rb.c| 8 +---
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/lightnvm/pblk-cache.c b/driv
is an extra copy on the DMA region on the device
and an extra comparison in the host, given that (i) the OOB area is
being read together with the data in the media, and (ii) the DMA region
allocated for the ppa list can be reused for the metadata stored on the
OOB area.
Signed-off-by: Javier González
Fix stat counter to collect the right number of I/Os being synced on the
completion path.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Use a constant instead of using meaningless tuning parameters on the
garbage collector algorithms.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-gc.c | 4 ++--
drivers/lightnvm/pblk.h| 2 +-
2 f
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 <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <
Add new error code introduced on the OCSSD spec 2.0 for write pointer
mismatch on the device side. This indicates to the host that a write on
a block (chunk) is not respecting the required sequentiality.
Signed-off-by: Javier González <jav...@cnexlabs.com>
---
include/linux/lightnvm.h | 3
the invalid bitmap accessible even when the
line is being recycled. When recycled data is being remapped, it is
enough to check the invalid bitmap for the line before updating the L2P
table.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cne
Simplify the part of the garbage collector where data is read from the
line being recycled and moved into an internal queue before being copied
to the memory buffer. This allows to get rid of a dedicated function,
which introduces an unnecessary dependency on the code.
Signed-off-by: Javier
on the completion path, where mapped pages need to be
freed.
Instead, use bio_copy_kern, which does the same and at the same time
simplifies the completion path.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/l
, create a new request type - internal write. This improves
code readability.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-recovery.c | 6 +++---
drivers/lightnvm/pblk-write.c| 6 +++---
drivers/lig
thus causing data corruption.
The rest of the patches are are basically bug fixes and refactoring to
improve code readability.
The patches apply on your for-4.14/block, and you can be found at:
https://github.com/OpenChannelSSD/linux/tree/pblk.for-4.14
Thanks,
Javier
Javier González (18):
lig
uffer")
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-read.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-rea
Refactor lba sanity check on read path to avoid code duplication.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-read.c | 29 ++---
1 file changed, 10 insertions(+), 19 deleti
Initialize the stat counter for garbage collected reads.
Fixes: a4bd217b43268 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-init.c |
Check for failed mempool allocations and act accordingly.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/lightnvm/pblk-core
Normalize the way we name ppa variables to improve code readability.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 48 +++-
1 file changed, 25 inser
On low LUN configurations, make sure not to send bios that are bigger
than the buffer size.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-init.c | 2 +-
drivers/lightnvm/pblk-rl.c | 6 ++
driv
the existing line
reference to decide when a line is eligible for being freed after the
recycle process.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 55 ++---
drivers/l
tes
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 <jav...@cnexlabs.com>
Signed-off-by: Matias Bjør
A partial read I/O in pblk is an I/O where some sectors reside in the
write buffer in main memory and some are persisted on the device. Such
an I/O must at least contain 2 lbas, therefore checking for the case
where a single lba is mapped is not necessary.
Signed-off-by: Javier González <
> On 6 Sep 2017, at 15.47, Christoph Hellwig <h...@infradead.org> wrote:
>
> On Wed, Sep 06, 2017 at 12:51:03PM +0200, Javier González wrote:
>> In pblk, buffers forming bios can be allocated on physically contiguous
>> or virtually contiguous memory. For physi
> On 6 Sep 2017, at 15.46, Christoph Hellwig wrote:
>
>> -#define ERASE 2 /* READ = 0, WRITE = 1 */
>> +/* READ = 0, WRITE (user) = 1 */
>> +#define ERASE 2
>> +#define WRITE_INT 3 /* Internal write. Not through write buffer */
>
> enum {
> PBLK_READ,
>
On low LUN configurations, make sure not to send bios that are bigger
than the buffer size.
Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
Initialize the stat counter for garbage collected reads.
Fixes: a4bd217b43268 ("lightnvm: physical block device (pblk) target")
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-init.c |
uffer")
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-read.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-rea
Hi Jens,
Here are the pblk bug fixes for this window.
The patches apply on your for-4.14/block, and you can be found at:
https://github.com/OpenChannelSSD/linux/tree/pblk.for-4.14
Thanks,
Javier
Javier González (6):
lightnvm: pblk: check for failed mempool alloc.
lightnvm: pblk
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 <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <
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 <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
> On 6 Sep 2017, at 17.09, Jens Axboe <ax...@kernel.dk> wrote:
>
> On 09/06/2017 09:08 AM, Johannes Thumshirn wrote:
>> On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote:
>>> Check for failed mempool allocations and act accordingly.
>>
>&g
> On 6 Sep 2017, at 16.04, Jens Axboe <ax...@kernel.dk> wrote:
>
> On 09/06/2017 04:50 AM, Javier González wrote:
>> Hi Jens,
>>
>> Here is the pblk patchset for this window.
>
> You must mean for the next window, surely, since we're in the mid
> On 6 Sep 2017, at 15.44, Christoph Hellwig <h...@infradead.org> wrote:
>
> On Wed, Sep 06, 2017 at 12:22:38PM +0200, Javier González wrote:
>> Add new error code introduced on the OCSSD spec 2.0 for write pointer
>> mismatch on the device side. This indicat
Check for failed mempool allocations and act accordingly.
Signed-off-by: Javier González <jav...@cnexlabs.com>
Signed-off-by: Matias Bjørling <mat...@cnexlabs.com>
---
drivers/lightnvm/pblk-core.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/lightnvm/pblk-core
> On 6 Sep 2017, at 17.13, Jens Axboe <ax...@kernel.dk> wrote:
>
> On 09/06/2017 09:12 AM, Javier González wrote:
>>> On 6 Sep 2017, at 17.09, Jens Axboe <ax...@kernel.dk> wrote:
>>>
>>> On 09/06/2017 09:08 AM, Johannes Thumshirn wrote:
>&
> On 6 Sep 2017, at 17.20, Jens Axboe <ax...@kernel.dk> wrote:
>
> On 09/06/2017 09:13 AM, Jens Axboe wrote:
>> On 09/06/2017 09:12 AM, Javier González wrote:
>>>> On 6 Sep 2017, at 17.09, Jens Axboe <ax...@kernel.dk> wrote:
>>>>
&g
t;nvm: removal failed, block device busy\n");
> + bdput(bdev);
> + mutex_unlock(>mlock);
> + return -EBUSY;
> + }
> + bdput(bdev);
> __nvm_remove_target(t);
> mutex_unlock(>mlock);
>
> --
> 2.7.4
Looks good.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
We need to consider bad
>* blocks to make sure that there are enough sectors to store emeta
>*/
> - bit = lm->sec_per_line;
> off = lm->sec_per_line - lm->emeta_sec[0];
> bitmap_set(line->invalid_bitmap, off, lm->emeta_sec[0]);
>
ev *, u64, u32, nvm_l2p_update_fn
> *,
> void *);
> --
> 2.7.4
This was used when using MLC media as SLC back in the days, when we had
the host media manager (spec 1.2). We probably want to have a path to
use NAND as SLC, but I agree that it should be separated in order to
reduce the number of checks (considering that this is for a very
specific purpose).
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
> On 2 Oct 2017, at 13.43, Rakesh Pandit <rak...@tuxera.com> wrote:
>
> On Mon, Oct 02, 2017 at 01:27:42PM +0200, Javier González wrote:
>>> On 28 Sep 2017, at 16.40, Rakesh Pandit <rak...@tuxera.com> wrote:
>>>
>>> pblk_line_gc_list s
sync_l2p(struct pblk_rb *rb)
> sync = smp_load_acquire(>sync);
>
> to_update = pblk_rb_ring_count(sync, rb->l2p_update, rb->nr_entries);
> - __pblk_rb_update_l2p(rb, >l2p_update, to_update);
> + __pblk_rb_update_l2p(rb, to_update);
>
>
t; extern int nvm_max_phys_sects(struct nvm_tgt_dev *);
> extern int nvm_submit_io(struct nvm_tgt_dev *, struct nvm_rq *);
> extern int nvm_erase_sync(struct nvm_tgt_dev *, struct ppa_addr *, int);
> -extern int nvm_set_rqd_ppalist(struct nvm_tgt_dev *, struct nvm_rq *,
> -
> On 28 Sep 2017, at 16.40, Rakesh Pandit wrote:
>
> pblk_line_gc_list seems to had a bug since the introduction of pblk in
> getting GC list for a line. In b20ba1bc7 while redesigning GC
> algorithm it was not fixed correctly. The problem is that even if
> valid sector
> On 1 Oct 2017, at 15.25, Rakesh Pandit wrote:
>
> While separating read and erase mempools in 22da65a1b pblk_g_rq_cache
> was used two times to set aside memory both for erase and read
> requests. Because same kmem cache is used repeatedly a single call to
>
> On 1 Oct 2017, at 15.26, Rakesh Pandit wrote:
>
> If pblk_core_init fails lets destroy all global caches.
>
> Signed-off-by: Rakesh Pandit
> ---
> drivers/lightnvm/pblk-init.c | 8 +++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git
> On 2 Oct 2017, at 13.32, Javier González <j...@lightnvm.io> wrote:
>
>> On 1 Oct 2017, at 15.23, Rakesh Pandit <rak...@tuxera.com> wrote:
>>
>> We already pass the structure pointer so no need to pass the member.
>>
>> Signed-off-by: Rak
--- a/drivers/lightnvm/pblk-init.c
> +++ b/drivers/lightnvm/pblk-init.c
> @@ -928,6 +928,7 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct
> gendisk *tdisk,
> pblk->dev = dev;
> pblk->disk = tdisk;
> pblk->state = PBLK_STATE_RUNNING;
> + pblk->gc.gc_enabled = 0;
>
> spin_lock_init(>trans_lock);
> spin_lock_init(>lock);
> --
> 2.7.4
LGTM.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
c.read_inflight_gc));
>
> sz += snprintf(page + sz, PAGE_SIZE - sz,
> "data (%d) cur:%d, left:%d, vsc:%d, s:%d, map:%d/%d (%d)\n",
> diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
> index f76583b..03965da 100644
> --- a/drivers/lightnvm/pblk.h
> +++ b/drivers/lightnvm/pblk.h
> @@ -238,7 +238,10 @@ struct pblk_gc {
> struct timer_list gc_timer;
>
> struct semaphore gc_sem;
> - atomic_t inflight_gc;
> + atomic_t read_inflight_gc; /* Number of lines with inflight GC reads */
> + atomic_t pipeline_gc; /* Number of lines in the GC pipeline -
> + * started reads to finished writes
> + */
> int w_entries;
>
> struct list_head w_list;
> --
> 2.7.4
LGTM.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
ader_wq)
> destroy_workqueue(gc->gc_line_reader_wq);
>
> if (gc->gc_writer_ts)
> kthread_stop(gc->gc_writer_ts);
> -
> - if (gc->gc_reader_ts)
> - kthread_stop(gc->gc_reader_ts);
> }
> --
> 2.7.4
LGTM.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
n the line bb */
> - off = lm->sec_per_line - lm->emeta_sec[0];
> - nr_bb = bitmap_weight(line->blk_bitmap, lm->blk_per_line);
> - off -= nr_bb * geo->sec_per_pl;
>
> - line->emeta_ssec = off;
> + line->emeta_ssec = pblk_line_emeta_start(pblk, line);
> line->emeta = emeta;
> memset(line->emeta->buf, 0, lm->emeta_len[0]);
>
> --
> 2.7.4
Apart from the commit message, it looks good.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
l_lines(pblk);
>
> @@ -898,6 +922,11 @@ static void pblk_exit(void *private)
> down_write(_lock);
> pblk_gc_exit(pblk);
> pblk_tear_down(pblk);
> +
> +#ifdef CONFIG_NVM_DEBUG
> + pr_info("pblk exit: L2P CRC: %x\n", pblk_l2p_crc(pblk));
> +#endif
> +
> pblk_free(pblk);
> up_write(_lock);
> }
> --
> 2.7.4
LGTM.
Reviewed-by: Javier González <jav...@cnexlabs.com>
signature.asc
Description: Message signed with OpenPGP
gt; + if (lba_list[paddr] != addr_empty)
> + line->nr_valid_lbas++;
> } else {
> - __le64 addr_empty = cpu_to_le64(ADDR_EMPTY);
> -
> lba_list[paddr] = meta_list[i].lba = addr_empty;
>
> On 3 Oct 2017, at 12.05, Hans Holmberg wrote:
>
> From: Hans Holmberg
>
> This patchset improves the robustness of recovery - fixing a bunch of
> issues that occurs when removing and re-creating a pblk instance.
> It also adds a
201 - 300 of 1003 matches
Mail list logo