From: Ingo Molnar <mingo@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: keventd_create_kthread
Date: Thu, 19 Feb 2004 02:46:08 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.58.0402190205040.16515@devserv.devel.redhat.com> (raw)
In-Reply-To: <20040218231322.35EE92C05F@lists.samba.org>
On Thu, 19 Feb 2004, Rusty Russell wrote:
> That's not enough: it can set that and then get preemted. It really
> want to return when the task is off the runqueue. The original
> wait_task_inactive() does an incredible complicated and AFAICT useless
> dance wrt not locking and disabling preempt explicitly. Ingo, how's
> this replacement? (And who wrote this code?)
this is old code that morphed many times. Its main use was for exit.c's
purpose and in heavy clone/exit workloads it made quite a difference
whether the 'polling' for task exit was done under the runqueue lock or
not - hence the complexity. Task freeing is poll-free in 2.6 so
wait_task_inactive() doesnt get nearly as heavy use.
The current wait_task_inactive() code seems to be OK on x86.
Context-switching cannot be preempted. The goal of wait_task_inactive() is
to wait for the task to unschedule on a CPU. If that's due to preempt then
it's due to preempt.
i'd strongly advise against using wait_task_inactive() in
keventd_create_kthread() - it's _polling_. We must not do any polling like
that in any modern interface. Why does keventd_create_kthread() need
wait_task_inactive()?
Ingo
next prev parent reply other threads:[~2004-02-19 7:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040218004648.7471bb37.akpm@osdl.org>
2004-02-18 23:12 ` keventd_create_kthread Rusty Russell
2004-02-19 7:46 ` Ingo Molnar [this message]
2004-02-19 8:10 ` keventd_create_kthread Andrew Morton
2004-02-19 8:16 ` keventd_create_kthread Ingo Molnar
2004-02-19 10:05 ` keventd_create_kthread Srivatsa Vaddagiri
2004-02-19 10:10 ` keventd_create_kthread Andrew Morton
2004-02-19 9:46 ` keventd_create_kthread Rusty Russell
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=Pine.LNX.4.58.0402190205040.16515@devserv.devel.redhat.com \
--to=mingo@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®