* [PATCH] lightnvm: pblk: fix incorrect min_write_pgs
@ 2018-08-17 14:36 Matias Bjørling
2018-08-20 7:45 ` Javier Gonzalez
0 siblings, 1 reply; 2+ messages in thread
From: Matias Bjørling @ 2018-08-17 14:36 UTC (permalink / raw)
To: igor.j.konopko, marcin.dziegielewski, javier, hans.holmberg,
hlitz, youngtack.jin
Cc: linux-block, linux-kernel, Matias Bjørling
The calculation of pblk->min_write_pgs should only use the optimal
write size attribute provided by the drive, it does not correlate to
the memory page size of the system, which can be smaller or larger
than the LBA size reported.
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
---
drivers/lightnvm/pblk-init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index 9119c64d6f62..8adc8ac8b03c 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -371,7 +371,7 @@ static int pblk_core_init(struct pblk *pblk)
atomic64_set(&pblk->nr_flush, 0);
pblk->nr_flush_rst = 0;
- pblk->min_write_pgs = geo->ws_opt * (geo->csecs / PAGE_SIZE);
+ pblk->min_write_pgs = geo->ws_opt;
max_write_ppas = pblk->min_write_pgs * geo->all_luns;
pblk->max_write_pgs = min_t(int, max_write_ppas, NVM_MAX_VLBA);
pblk_set_sec_per_write(pblk, pblk->min_write_pgs);
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] lightnvm: pblk: fix incorrect min_write_pgs
2018-08-17 14:36 [PATCH] lightnvm: pblk: fix incorrect min_write_pgs Matias Bjørling
@ 2018-08-20 7:45 ` Javier Gonzalez
0 siblings, 0 replies; 2+ messages in thread
From: Javier Gonzalez @ 2018-08-20 7:45 UTC (permalink / raw)
To: Matias Bjørling
Cc: Konopko, Igor J, Dziegielewski, Marcin, Hans Holmberg,
Heiner Litz, Young Tack Tack Jin, linux-block, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
> On 17 Aug 2018, at 16.36, Matias Bjørling <mb@lightnvm.io> wrote:
>
> The calculation of pblk->min_write_pgs should only use the optimal
> write size attribute provided by the drive, it does not correlate to
> the memory page size of the system, which can be smaller or larger
> than the LBA size reported.
>
> Signed-off-by: Matias Bjørling <mb@lightnvm.io>
> ---
> drivers/lightnvm/pblk-init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
> index 9119c64d6f62..8adc8ac8b03c 100644
> --- a/drivers/lightnvm/pblk-init.c
> +++ b/drivers/lightnvm/pblk-init.c
> @@ -371,7 +371,7 @@ static int pblk_core_init(struct pblk *pblk)
> atomic64_set(&pblk->nr_flush, 0);
> pblk->nr_flush_rst = 0;
>
> - pblk->min_write_pgs = geo->ws_opt * (geo->csecs / PAGE_SIZE);
> + pblk->min_write_pgs = geo->ws_opt;
> max_write_ppas = pblk->min_write_pgs * geo->all_luns;
> pblk->max_write_pgs = min_t(int, max_write_ppas, NVM_MAX_VLBA);
> pblk_set_sec_per_write(pblk, pblk->min_write_pgs);
> --
> 2.11.0
Looks good to me.
Reviewed-by: Javier González <javier@cnexlabs.com>
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-20 7:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-17 14:36 [PATCH] lightnvm: pblk: fix incorrect min_write_pgs Matias Bjørling
2018-08-20 7:45 ` Javier Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®