All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Rik van Riel <riel@redhat.com>, Christoph Lameter <cl@linux.com>,
	Tejun Heo <tj@kernel.org>, Rusty Russell <rusty@rustcorp.com.au>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] kmod: don't run async usermode helper as a child of kworker thread
Date: Thu, 15 Oct 2015 16:37:39 +0200	[thread overview]
Message-ID: <20151015143739.GA20060@redhat.com> (raw)
In-Reply-To: <20151014185153.GA8117@redhat.com>

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.


  parent reply	other threads:[~2015-10-15 14:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 18:51 [PATCH 0/1] Revert "kmod: handle UMH_WAIT_PROC from system unbound workqueue" Oleg Nesterov
2015-10-14 18:52 ` [PATCH 1/1] " Oleg Nesterov
2015-10-15 13:37   ` Frederic Weisbecker
2015-10-15 15:18     ` Oleg Nesterov
2015-10-15 15:34       ` Frederic Weisbecker
2015-10-15 14:37 ` Oleg Nesterov [this message]
2015-10-15 14:37   ` [PATCH 0/1] kmod: don't run async usermode helper as a child of kworker thread Oleg Nesterov
2015-10-15 15:52     ` Frederic Weisbecker
2015-10-15 16:32       ` Oleg Nesterov
2015-10-15 16:53         ` Frederic Weisbecker
2015-10-15 17:51           ` Oleg Nesterov
2015-10-15 17:52   ` [PATCH v2 1/1] " Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151015143739.GA20060@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.