• Lars Ellenberg's avatar
    drbd: add back some fairness to AL transactions · e4d7d6f4
    Lars Ellenberg authored
    When batching more updates to the activity log into single transactions,
    we lost the ability for new requests to force themselves into the active
    set: all preparation steps became non-blocking, and if all currently
    hot extents keep busy, they could starve out new incoming requests
    to cold extents for quite a while.
    
    This can only happen if your IO backend accepts more IO operations per
    average DRBD replication round trip time than you have al-extents
    configured.
    
    If we have incoming requests to cold extents,
    at least do one blocking update per transaction.
    
    In an artificial worst-case workload on SSD with an asynchronous 600 ms
    replication link, with al-extents = 7 (the minimum we allow), and
    concurrent full resynch, without this patch, some write requests have
    been observed to be starved for 40 seconds.
    With this patch, application observed a worst case latency of twice the
    replication round trip time.
    Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    e4d7d6f4
drbd_req.c 43.5 KB