Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758169AbbGGQcK (ORCPT ); Tue, 7 Jul 2015 12:32:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46846 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758151AbbGGQcB (ORCPT ); Tue, 7 Jul 2015 12:32:01 -0400 Date: Tue, 7 Jul 2015 18:30:30 +0200 From: Oleg Nesterov To: Frederic Weisbecker Cc: LKML , Christoph Lameter , Rik van Riel , Andrew Morton Subject: Re: [PATCH 3/3] kmod: Remove unecessary explicit wide CPU affinity setting Message-ID: <20150707163030.GA16647@redhat.com> References: <1436196821-13962-1-git-send-email-fweisbec@gmail.com> <1436196821-13962-4-git-send-email-fweisbec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436196821-13962-4-git-send-email-fweisbec@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1818 Lines: 46 On 07/06, Frederic Weisbecker wrote: > > The call_usermodehelper_exec_[a]sync() kernel threads are created by > khelper precisely because I think khelper should simply die. It doesn't make any sense today, kmod.c should use some system wq instead. But see below. > 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. Confused... I do not see how workqueue_attrs->cpumask can depend on tick_nohz_full_mask or housekeeping_mask. Could you explain? > @@ -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); > - I think this is fine, ->no_numa is true for khelper. But this means that after this change kmod.c can't use a system wq, ->no_numa is false by default. And khelper is no_numa only because it is __WQ_ORDERED, but kmod.c doesn't need really need__WQ_ORDERED, except, again, this implies ->no_numa == T. So perhaps init_workqueues() should create another global WQ_UNBOUND/no_numa workqueue_struct so that we could kill khelper_wq? Or kmod.c can use system_unbound_wq, but then we need to keep this set_cpus_allowed_ptr(). To me khelper_wq looks just annoying... Oleg. -- 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/