• Javier González's avatar
    lightnvm: pblk: simplify work_queue mempool · b84ae4a8
    Javier González authored
    In pblk, we have a mempool to allocate a generic structure that we
    pass along workqueues. This is heavily used in the GC path in order
    to have enough inflight reads and fully utilize the GC bandwidth.
    
    However, the current GC path copies data to the host memory and puts it
    back into the write buffer. This requires a vmalloc allocation for the
    data and a memory copy. Thus, guaranteeing the allocation by using a
    mempool for the structure in itself does not give us much. Until we
    implement support for vector copy to avoid moving data through the host,
    just allocate the workqueue structure using kmalloc.
    
    This allows us to have a much smaller mempool.
    Reported-by: default avatarJens Axboe <axboe@kernel.dk>
    Signed-off-by: default avatarJavier González <javier@cnexlabs.com>
    Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    b84ae4a8
pblk-core.c 45.5 KB