Skip to content
Snippets Groups Projects
  • Frederic Weisbecker's avatar
    b04e317b
    treewide: Introduce kthread_run_worker[_on_cpu]() · b04e317b
    Frederic Weisbecker authored
    
    kthread_create() creates a kthread without running it yet. kthread_run()
    creates a kthread and runs it.
    
    On the other hand, kthread_create_worker() creates a kthread worker and
    runs it.
    
    This difference in behaviours is confusing. Also there is no way to
    create a kthread worker and affine it using kthread_bind_mask() or
    kthread_affine_preferred() before starting it.
    
    Consolidate the behaviours and introduce kthread_run_worker[_on_cpu]()
    that behaves just like kthread_run(). kthread_create_worker[_on_cpu]()
    will now only create a kthread worker without starting it.
    
    Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
    Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
    b04e317b
    History
    treewide: Introduce kthread_run_worker[_on_cpu]()
    Frederic Weisbecker authored
    
    kthread_create() creates a kthread without running it yet. kthread_run()
    creates a kthread and runs it.
    
    On the other hand, kthread_create_worker() creates a kthread worker and
    runs it.
    
    This difference in behaviours is confusing. Also there is no way to
    create a kthread worker and affine it using kthread_bind_mask() or
    kthread_affine_preferred() before starting it.
    
    Consolidate the behaviours and introduce kthread_run_worker[_on_cpu]()
    that behaves just like kthread_run(). kthread_create_worker[_on_cpu]()
    will now only create a kthread worker without starting it.
    
    Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
    Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
crypto_engine.c 19.34 KiB