Skip to content
  • Frederic Weisbecker's avatar
    kmod: bunch of internal functions renames · b6b50a81
    Frederic Weisbecker authored
    
    
    This patchset does a bunch of cleanups and converts khelper to use system
    unbound workqueues.  The 3 first patches should be uncontroversial.  The
    last 2 patches are debatable.
    
    Kmod creates kernel threads that perform userspace jobs and we want those
    to have a large affinity in order not to contend busy CPUs.  This is
    (partly) why we use khelper which has a wide affinity that the kernel
    threads it create can inherit from.  Now khelper is a dedicated workqueue
    that has singlethread properties which we aren't interested in.
    
    Hence those two debatable changes:
    
    _ We would like to use generic workqueues. System unbound workqueues are
      a very good candidate but they are not wide affine, only node affine.
      Now probably a node is enough to perform many parallel kmod jobs.
    
    _ We would like to remove the wait_for_helper kernel thread (UMH_WAIT_PROC
      handler) to use the workqueue. It means that if the workqueue blocks,
      and no other worker can take pending kmod request, we can be screwed.
      Now if we have 512 threads, this should be enough.
    
    This patch (of 5):
    
    Underscores on function names aren't much verbose to explain the purpose
    of a function.  And kmod has interesting such flavours.
    
    Lets rename the following functions:
    
    * __call_usermodehelper -> call_usermodehelper_exec_work
    * ____call_usermodehelper -> call_usermodehelper_exec_async
    * wait_for_helper -> call_usermodehelper_exec_sync
    
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b6b50a81