linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Omar Kilani <omar.kilani@gmail.com>
To: linux-block@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: blk-wbt / wbt_rqw_done logic?
Date: Wed, 16 Jun 2021 10:36:32 -0700	[thread overview]
Message-ID: <CA+8F9hh3vqc=jdTi4xfV40AgbJ2GRdmastv=smyuDCYVFRVV5g@mail.gmail.com> (raw)

Hi Jens,

While looking into a deadlock that Jan has fixed:

https://lore.kernel.org/linux-block/CA+8F9hggf7jOcGRxvBoa8FYxQs8ZV+XueVAd9BodpQQP_+8Pdw@mail.gmail.com/T/

I noticed this line of code in blk-wbt.c (L164):

-               if (!inflight || diff >= rwb->wb_background / 2)

And based on the preceding logic calculating `limit` and the comment
in the "no wakeup" check above which references "normal limit" and
decides based on `limit`, it's not clear why `rwb->wb_background` is
used here as there's no comment.

Should this be:

+               if (!inflight || diff >= limit / 2)

I traced the history of the line back to 4.20rc but it hasn't changed
since being added.

Thanks!

Regards,
Omar

                 reply	other threads:[~2021-06-16 17:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CA+8F9hh3vqc=jdTi4xfV40AgbJ2GRdmastv=smyuDCYVFRVV5g@mail.gmail.com' \
    --to=omar.kilani@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --subject='Re: blk-wbt / wbt_rqw_done logic?' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).