blk-wbt / wbt_rqw_done logic?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jens,

While looking into a deadlock that Jan has fixed:

https://lore.kernel.org/linux-block/CA+8F9hggf7jOcGRxvBoa8FYxQs8ZV+XueVAd9BodpQQP_+8Pdw@xxxxxxxxxxxxxx/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



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux