diff mbox

IB/ehca: use kthread_create_on_node

Message ID 1311923731.7845.25.camel@edumazet-laptop (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Dumazet July 29, 2011, 7:15 a.m. UTC
Since create_comp_task() creates percpu kthread, it makes
sense to use kthread_create_on_node() to get proper NUMA affinity for
kthread stack.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
CC: Christoph Raisch <raisch@de.ibm.com>
CC: Roland Dreier <roland@kernel.org>
CC: Sean Hefty <sean.hefty@intel.com>
---
 drivers/infiniband/hw/ehca/ehca_irq.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Roland Dreier July 29, 2011, 5:10 p.m. UTC | #1
On Fri, Jul 29, 2011 at 12:15 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Since create_comp_task() creates percpu kthread, it makes
> sense to use kthread_create_on_node() to get proper NUMA affinity for
> kthread stack.

Seems eminently sane to me.  ehca guys, any concern about this?

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hoang-Nam Nguyen July 29, 2011, 5:39 p.m. UTC | #2
Hi Roland,
This patch looks fine to me.
Thanks
Nam

roland@purestorage.com wrote on 29.07.2011 19:10:32:

> [image removed]
>
> Re: [PATCH] IB/ehca: use kthread_create_on_node
>
> Roland Dreier
>
> to:
>
> Eric Dumazet
>
> 29.07.2011 19:11
>
> Sent by:
>
> roland@purestorage.com
>
> Cc:
>
> Hoang-Nam Nguyen, Christoph Raisch, Sean Hefty, linux-rdma, linux-kernel
>
> On Fri, Jul 29, 2011 at 12:15 AM, Eric Dumazet <eric.dumazet@gmail.com>
wrote:
> > Since create_comp_task() creates percpu kthread, it makes
> > sense to use kthread_create_on_node() to get proper NUMA affinity for
> > kthread stack.
>
> Seems eminently sane to me.  ehca guys, any concern about this?
>
>  - R.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c
index e571e60..5358900 100644
--- a/drivers/infiniband/hw/ehca/ehca_irq.c
+++ b/drivers/infiniband/hw/ehca/ehca_irq.c
@@ -786,7 +786,8 @@  static struct task_struct *create_comp_task(struct ehca_comp_pool *pool,
 	spin_lock_init(&cct->task_lock);
 	INIT_LIST_HEAD(&cct->cq_list);
 	init_waitqueue_head(&cct->wait_queue);
-	cct->task = kthread_create(comp_task, cct, "ehca_comp/%d", cpu);
+	cct->task = kthread_create_on_node(comp_task, cct, cpu_to_node(cpu),
+					   "ehca_comp/%d", cpu);
 
 	return cct->task;
 }