Skip to content
  • Jianchao Wang's avatar
    block: kyber: make kyber more friendly with merging · a6088845
    Jianchao Wang authored
    Currently, kyber is very unfriendly with merging. kyber depends
    on ctx rq_list to do merging, however, most of time, it will not
    leave any requests in ctx rq_list. This is because even if tokens
    of one domain is used up, kyber will try to dispatch requests
    from other domain and flush the rq_list there.
    
    To improve this, we setup kyber_ctx_queue (kcq) which is similar
    with ctx, but it has rq_lists for different domain and build same
    mapping between kcq and khd as the ctx & hctx. Then we could merge,
    insert and dispatch for different domains separately. At the same
    time, only flush the rq_list of kcq when get domain token successfully.
    Then if one domain token is used up, the requests could be left in
    the rq_list of that domain and maybe merged with following io.
    
    Following is my test result on machine with 8 cores and NVMe card
    INTEL SSDPEKKR128G7
    
    fio size=256m ioengine=libaio iodepth=64 direct=1 numjobs=8
    seq/random
    +------+-----------------------------...
    a6088845