From: Jens Axboe <axboe@kernel.dk>
To: "Matias Bjørling" <mb@lightnvm.io>,
"Javier González" <javier@javigon.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pblk: fix max_io calculation
Date: Thu, 7 Mar 2019 08:59:45 -0700 [thread overview]
Message-ID: <a2f98eea-2407-49ad-4ff6-c1e92762d2f8@kernel.dk> (raw)
In-Reply-To: <8b13dcf3-4486-0e14-b718-417c7fc42a7b@lightnvm.io>
On 3/7/19 8:57 AM, Matias Bjørling wrote:
> On 3/7/19 1:18 PM, Javier González wrote:
>> When calculating the maximun I/O size allowed into the buffer, consider
>> the write size (ws_opt) used by the write thread in order to cover the
>> case in which, due to flushes, the mem and subm pointers are disaligned
>> by (ws_opt - 1). This case currently translates into a stall when
>> an I/O of the largest possible size is submitted.
>>
>> Fixes: f9f9d1ae2c66 ("lightnvm: pblk: prevent stall due to wb threshold")
>>
>> Signed-off-by: Javier González <javier@javigon.com>
>> ---
>>
>> Matias: Can you apply this as a fix to 5.1. This is a case I missed when fixing
>> the wb threshold, which is also scheduled for 5.1
>>
>> Thanks,
>> Javier
>>
>> drivers/lightnvm/pblk-rl.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/lightnvm/pblk-rl.c b/drivers/lightnvm/pblk-rl.c
>> index b014957dde0b..a5f8bc2defbc 100644
>> --- a/drivers/lightnvm/pblk-rl.c
>> +++ b/drivers/lightnvm/pblk-rl.c
>> @@ -233,10 +233,15 @@ void pblk_rl_init(struct pblk_rl *rl, int budget, int threshold)
>> /* To start with, all buffer is available to user I/O writers */
>> rl->rb_budget = budget;
>> rl->rb_user_max = budget;
>> - rl->rb_max_io = threshold ? (budget - threshold) : (budget - 1);
>> rl->rb_gc_max = 0;
>> rl->rb_state = PBLK_RL_HIGH;
>>
>> + /* Maximize I/O size and ansure that back threshold is respected */
>> + if (threshold)
>> + rl->rb_max_io = budget - pblk->min_write_pgs_data - threshold;
>> + else
>> + rl->rb_max_io = budget - pblk->min_write_pgs_data - 1;
>> +
>> atomic_set(&rl->rb_user_cnt, 0);
>> atomic_set(&rl->rb_gc_cnt, 0);
>> atomic_set(&rl->rb_space, -1);
>>
>
> Hi Jens,
>
> If possible, could you please pick this one up for 5.1? It fixes a
> previous patch that was introduced in 5.1 that should fix a stall, but
> didn't quite catch it.
Applied
--
Jens Axboe
prev parent reply other threads:[~2019-03-07 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 12:18 Javier González
2019-03-07 15:57 ` Matias Bjørling
2019-03-07 15:59 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a2f98eea-2407-49ad-4ff6-c1e92762d2f8@kernel.dk \
--to=axboe@kernel.dk \
--cc=javier@javigon.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@lightnvm.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®