From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754310AbbGISHm (ORCPT ); Thu, 9 Jul 2015 14:07:42 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:36006 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754266AbbGISHa (ORCPT ); Thu, 9 Jul 2015 14:07:30 -0400 From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Oleg Nesterov , Christoph Lameter , Rik van Riel , Andrew Morton Subject: [PATCH 4/5] kmod: Remove unecessary explicit wide CPU affinity setting Date: Thu, 9 Jul 2015 20:07:16 +0200 Message-Id: <1436465237-22031-5-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436465237-22031-1-git-send-email-fweisbec@gmail.com> References: <1436465237-22031-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The call_usermodehelper_exec_[a]sync() kernel threads are created by unbound workqueues precisely because we want them to be affine to all CPUs, irrespective of any call_usermodehelper() caller with possibly reduced CPU affinity. So this explicit all-CPUs wide affinity forcing is useless. Not only useless it even adds disturbance on isolated CPUs in nohz full configurations where users set the unbound workqueues low level cpumask to a reduced set in order to execute non-user-critical work on housekeeping dedicated CPUs. This reduced affinity is naturally inherited to usermodehelper kernel threads but the explicit call to set_cpus_allowed_ptr() breaks that. So just remove it. Cc: Rik van Riel Cc: Oleg Nesterov Cc: Andrew Morton Cc: Christoph Lameter Signed-off-by: Frederic Weisbecker --- kernel/kmod.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/kmod.c b/kernel/kmod.c index 9ffb24c..d190178 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -221,9 +221,6 @@ static int call_usermodehelper_exec_async(void *data) flush_signal_handlers(current, 1); spin_unlock_irq(¤t->sighand->siglock); - /* We can run anywhere, unlike our parent (unbound workqueue). */ - set_cpus_allowed_ptr(current, cpu_all_mask); - /* * Our parent is the unbound workqueue, which runs with elevated * scheduling priority. Avoid propagating that into the userspace child. -- 2.1.4