• Petr Mladek's avatar
    IB/rdmavt: Handle the kthread worker using the new API · f5eabf5e
    Petr Mladek authored
    Use the new API to create and destroy the cq kthread worker.
    The API hides some implementation details.
    
    In particular, kthread_create_worker() allocates and initializes
    struct kthread_worker. It runs the kthread the right way and stores
    task_struct into the worker structure. In addition, the *on_cpu()
    variant binds the kthread to the given cpu and the related memory
    node.
    
    kthread_destroy_worker() flushes all pending works, stops
    the kthread and frees the structure.
    
    This patch does not change the existing behavior. Note that we must
    use the on_cpu() variant because the function starts the kthread
    and it must bind it to the right CPU before waking. The numa node
    is associated for given CPU as well.
    Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    f5eabf5e
cq.c 13.6 KB