• Corrado Zoccolo's avatar
    cfq-iosched: adapt slice to number of processes doing I/O · 5db5d642
    Corrado Zoccolo authored
    When the number of processes performing I/O concurrently increases,
    a fixed time slice per process will cause large latencies.
    
    This patch, if low_latency mode is enabled,  will scale the time slice
    assigned to each process according to a 300ms target latency.
    
    In order to keep fairness among processes:
    * The number of active processes is computed using a special form of
    running average, that quickly follows sudden increases (to keep latency low),
    and decrease slowly (to have fairness in spite of rapid decreases of this
    value).
    
    To safeguard sequential bandwidth, we impose a minimum time slice
    (computed using 2*cfq_slice_idle as base, adjusted according to priority
    and async-ness).
    Signed-off-by: default avatarCorrado Zoccolo <czoccolo@gmail.com>
    Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
    5db5d642
cfq-iosched.c 71.1 KB