From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH] kthread: convert stop_machine into a kthread
Date: Tue, 20 Jun 2006 03:27:45 -0500 [thread overview]
Message-ID: <20060620082745.GA28092@sergelap> (raw)
In-Reply-To: <20060619201450.3434f72f.akpm@osdl.org>
Quoting Andrew Morton (akpm@osdl.org):
> OK. But if we're going to convert to the kthread API then stopmachine()
> really whould be switched to the more efficient kthread_bind().
Ah, like so?
Rusty, do you feel this makes the conversion less of a step backward?
If not, Andrew, as Rusty pointed out, stop_machine.c does not fall into
the set of kernel_thread users which need to be updated either for the
deprecation or to deal with pid namespaces, and perhaps my previous
patch should not be applied after all.
thanks,
-serge
From: Serge E. Hallyn <serue@us.ibm.com>
Date: Tue, 20 Jun 2006 03:17:44 -0500
Subject: [PATCH] kthread: convert stop_machine to use kthread_bind
Convert stop_machine to use the more efficient kthread_bind()
in place of set_cpus_allowed().
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
---
kernel/stop_machine.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
831c955bcc8572f0aea75ab608ed5da37680df4e
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 2dd5a48..a462deb 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -31,7 +31,7 @@ static int stopmachine(void *cpu)
int irqs_disabled = 0;
int prepared = 0;
- set_cpus_allowed(current, cpumask_of_cpu((int)(long)cpu));
+ kthread_bind(current, (unsigned int)(long)cpu);
/* Ack: we are alive */
smp_mb(); /* Theoretically the ack = 0 might not be on this CPU yet. */
--
1.3.3
next prev parent reply other threads:[~2006-06-20 8:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-15 14:43 [PATCH] kthread: convert stop_machine into a kthread Serge E. Hallyn
2006-06-20 3:14 ` Andrew Morton
2006-06-20 3:20 ` Erik Ohrnberger
2006-06-20 8:27 ` Serge E. Hallyn [this message]
2006-06-20 8:40 ` Andrew Morton
2006-06-20 16:27 ` Serge E. Hallyn
2006-06-20 22:42 ` Andrew Morton
2006-06-21 0:52 ` Serge E. Hallyn
2006-06-21 1:18 ` Andrew Morton
2006-06-21 1:44 ` Serge E. Hallyn
2006-06-21 3:15 ` [PATCH] kthread: move kernel-doc and put it into DocBook Randy.Dunlap
[not found] <17553.56625.612931.136018@cargo.ozlabs.ibm.com>
2006-06-16 1:04 ` [PATCH] kthread: convert stop_machine into a kthread Rusty Russell
2006-06-16 3:04 ` Serge E. Hallyn
2006-06-16 3:54 ` Paul Mackerras
2006-06-16 4:00 ` Rusty Russell
2006-06-16 12:54 ` Serge E. Hallyn
2006-06-18 12:12 ` 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=20060620082745.GA28092@sergelap \
--to=serue@us.ibm.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