lightnvm: pblk: avoid being reported as hung on rated GC
authorJavier González <javier@cnexlabs.com>
Fri, 13 Oct 2017 12:46:45 +0000 (14:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Oct 2017 14:34:57 +0000 (08:34 -0600)
commit8da10cce7c7f7f9f5edc77271cf6e0c45b762004
treedf5e06e0c677893b7376da4d6510e5538fe199c5
parent8bd400204bd500bb2aea7b551f7c33bad2455340
lightnvm: pblk: avoid being reported as hung on rated GC

The amount of GC I/O on the write buffer is managed by the rate-limiter,
which is calculated as a function of the number of available free
blocks. When reaching the stable point, we risk having scheduled more
I/Os for GC than are allowed on the write buffer. This would result on
the GC semaphore balancing the outstanding read GC I/Os to be reported
as "hung", though the behavior is normal.

Solve this by allowing to schedule when we detect that the read GC path
is not moving forward.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-gc.c