Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753976AbbGFPeN (ORCPT ); Mon, 6 Jul 2015 11:34:13 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:34030 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbbGFPd7 (ORCPT ); Mon, 6 Jul 2015 11:33:59 -0400 From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Oleg Nesterov , Christoph Lameter , Rik van Riel , Andrew Morton Subject: [PATCH 3/3] kmod: Remove unecessary explicit wide CPU affinity setting Date: Mon, 6 Jul 2015 17:33:41 +0200 Message-Id: <1436196821-13962-4-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436196821-13962-1-git-send-email-fweisbec@gmail.com> References: <1436196821-13962-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2045 Lines: 52 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 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 f940b21..b89342b 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -223,9 +223,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 keventd(). */ - set_cpus_allowed_ptr(current, cpu_all_mask); - /* * Our parent is keventd, which runs with elevated scheduling priority. * Avoid propagating that into the userspace child. -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/