From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753291AbbJOOlI (ORCPT ); Thu, 15 Oct 2015 10:41:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50765 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751860AbbJOOlH (ORCPT ); Thu, 15 Oct 2015 10:41:07 -0400 Date: Thu, 15 Oct 2015 16:37:39 +0200 From: Oleg Nesterov To: Andrew Morton Cc: Frederic Weisbecker , Rik van Riel , Christoph Lameter , Tejun Heo , Rusty Russell , linux-kernel@vger.kernel.org Subject: [PATCH 0/1] kmod: don't run async usermode helper as a child of kworker thread Message-ID: <20151015143739.GA20060@redhat.com> References: <20151014185153.GA8117@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151014185153.GA8117@redhat.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 Andrew, please drop revert-kmod-handle-umh_wait_proc-from-system-unbound-workqueue.patch I sent yesterday. On a second thought we have a better solution. On 10/14, Oleg Nesterov wrote: > > Hello, > > I noticed by accident the kworker zombies on my testing machine. > Can't reproduce (although I think it won't be hard to make a > test-case), but I think the reason is clear, see the changelog. > > We could fix this by using kthread_create() if !UMH_WAIT_PROC, > but imo it would be better to revert this change at least for > now. I changed my mind. I was worried about other workqueue callbacks which could abuse kernel_thread() and populate kworker->children even if we change call_usermodehelper_exec_work() to not do this. But according to git-grep nobody does this. And this is good! Because we can do more cleanups (will try to send "soon") to ensure that all kthreads have parent == kthreadd. And since the worker thread is already its child, we do not need kthread_create(), we can just use CLONE_PARENT (which should be later used by kernel_thread() by default). > If we really want to avoid the extra kernel_thread(), we > can make another patch which also avoids sys_wait4() and the > games with SIGCHLD; we can rely on wait_chldexit. Yes, this probably makes sense too, but we can do this regardless. Oleg.