From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Davide Libenzi <davidel@xmailserver.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Roland McGrath <roland@redhat.com>,
Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] make kthread_create() more scalable
Date: Fri, 13 Apr 2007 14:31:04 -0700 [thread overview]
Message-ID: <20070413143104.99a1eeb9.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070413130201.GA170@tv-sign.ru>
On Fri, 13 Apr 2007 17:02:01 +0400
Oleg Nesterov <oleg@tv-sign.ru> wrote:
> If kernel_thread(kthread) succeeds, kthread() can not fail on its path to
> complete(&create->started) + schedule(). After that it can't be woken because
> nobody can see the new task yet. This means:
>
> - we don't need tasklist_lock for find_task_by_pid().
>
> - create_kthread() doesn't need to wait for create->started. Instead,
> kthread_create() first waits for create->created to get the result of
> kernel_thread(), then waits for create->started to synchronize with
> kthread().
Why don't we need tasklist_lock for find_task_by_pid()? I'd have though that
we'd at least need rcu_read_lock(), and I'm not sure that the implicit
understanding of pid-management internals here is a great idea.
next prev parent reply other threads:[~2007-04-13 21:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-13 13:02 [PATCH 2/3] make kthread_create() more scalable Oleg Nesterov
2007-04-13 21:31 ` Andrew Morton [this message]
2007-04-13 21:51 ` Eric W. Biederman
2007-04-13 22:08 ` Andrew Morton
2007-04-13 23:06 ` Eric W. Biederman
2007-04-13 23:34 ` Eric W. Biederman
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=20070413143104.99a1eeb9.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--cc=rjw@sisk.pl \
--cc=roland@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox