• Javier González's avatar
    lightnvm: pblk: prevent stall due to wb threshold · b4cdc426
    Javier González authored
    In order to respect mw_cuinits, pblk's write buffer maintains a
    backpointer to protect data not yet persisted; when writing to the write
    buffer, this backpointer defines a threshold that pblk's rate-limiter
    enforces.
    
    On small PU configurations, the following scenarios might take place: (i)
    the threshold is larger than the write buffer and (ii) the threshold is
    smaller than the write buffer, but larger than the maximun allowed
    split bio - 256KB at this moment (Note that writes are not always
    split - we only do this when we the size of the buffer is smaller
    than the buffer). In both cases, pblk's rate-limiter prevents the I/O to
    be written to the buffer, thus stalling.
    
    This patch fixes the original backpointer implementation by considering
    the threshold both on buffer creation and on the rate-limiters path,
    when bio_split is triggered (case (ii) above).
    
    Fixes: 766c8ceb ("lightnvm: pblk: guarantee that backpointer is respected on writer stall")
    Signed-off-by: default avatarJavier González <javier@javigon.com>
    Reviewed-by: default avatarHans Holmberg <hans.holmberg@cnexlabs.com>
    Signed-off-by: default avatarMatias Bjørling <mb@lightnvm.io>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    b4cdc426
pblk.h 39.9 KB