kmod: Remove unecessary explicit wide CPU affinity setting

The call_usermodehelper_exec_[a]sync() kernel threads are created by
khelper precisely because we want them to be affine to all CPUs,
irrespective of any call_usermodehelper() caller with reduced CPU
affinity. So this explicit all-CPUs wide affinity forcing is useless.

Not only useless it even breaks nohz full. The housekeeping work
(general kernel internal code that user doesn't care much about) is
handled by a reduced set of CPUs in nohz full, precisely those that are
not included by nohz_full= kernel parameters. For example unbound
workqueues are handled by housekeeping CPUs. And we want the
usermodehelper tasks to be handled by housekeeping CPUs because they are
kernel internals that user critical nohz full work don't want to be
disturbed by.

In nohz full configurations, khelper will naturally be affine to
housekeeping CPUs and this housekeeping affinity is then inherited by
usermodehelper kernel threads. But the explicit call to
set_cpus_allowed_ptr() breaks that.

Simply remove it.

Cc: Rik van Riel <riel@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
1 file changed