From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Tejun Heo <tj@kernel.org>, Rusty Russell <rusty@rustcorp.com.au>,
Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@linux.intel.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH -tip] rcu: use kthread_create_on_node()
Date: Fri, 20 May 2011 16:23:33 -0700 [thread overview]
Message-ID: <20110520232333.GO2366@linux.vnet.ibm.com> (raw)
In-Reply-To: <1305793965.3028.15.camel@edumazet-laptop>
On Thu, May 19, 2011 at 10:32:45AM +0200, Eric Dumazet wrote:
> Commit a26ac2455ffc (move TREE_RCU from softirq to kthread) added
> creation of per cpu kthreads.
>
> Use kthread_create_on_node() NUMA friendly function, to let these
> threads use local node for their stack/task struct.
>
> We did a similar change in commit 94dcf29a11b3 (kthread: use
> kthread_create_on_node())
>
> Also change rcu torture kthread creation.
Queued, thank you, Eric!
Thanx, Paul
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Tejun Heo <tj@kernel.org>
> CC: Rusty Russell <rusty@rustcorp.com.au>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: Andi Kleen <ak@linux.intel.com>
> CC: Ingo Molnar <mingo@elte.hu>
> ---
> kernel/rcutorture.c | 3 ++-
> kernel/rcutree.c | 5 ++++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
> index 2e138db..40d9ed2 100644
> --- a/kernel/rcutorture.c
> +++ b/kernel/rcutorture.c
> @@ -1282,7 +1282,8 @@ static int rcutorture_booster_init(int cpu)
> /* Don't allow time recalculation while creating a new task. */
> mutex_lock(&boost_mutex);
> VERBOSE_PRINTK_STRING("Creating rcu_torture_boost task");
> - boost_tasks[cpu] = kthread_create(rcu_torture_boost, NULL,
> + boost_tasks[cpu] = kthread_create_on_node(rcu_torture_boost, NULL,
> + cpu_to_node(cpu),
> "rcu_torture_boost");
> if (IS_ERR(boost_tasks[cpu])) {
> retval = PTR_ERR(boost_tasks[cpu]);
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 5616b17..b013915 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1649,7 +1649,10 @@ static int __cpuinit rcu_spawn_one_cpu_kthread(int cpu)
> if (!rcu_kthreads_spawnable ||
> per_cpu(rcu_cpu_kthread_task, cpu) != NULL)
> return 0;
> - t = kthread_create(rcu_cpu_kthread, (void *)(long)cpu, "rcuc%d", cpu);
> + t = kthread_create_on_node(rcu_cpu_kthread,
> + (void *)(long)cpu,
> + cpu_to_node(cpu),
> + "rcuc%d", cpu);
> if (IS_ERR(t))
> return PTR_ERR(t);
> kthread_bind(t, cpu);
>
>
prev parent reply other threads:[~2011-05-20 23:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 8:32 Eric Dumazet
2011-05-20 23:23 ` Paul E. McKenney [this message]
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=20110520232333.GO2366@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome