blk-wbt / wbt_rqw_done logic?

From: Omar Kilani <hidden>
Date: 2021-06-16 17:36:47

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/ (local)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help