Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1172475
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Nathan Zimmer <nzimmer@sgi.com> |
| Newsgroups | linux.kernel |
| Subject | [RFC] kthread_create_on_node is failing to honor the node choice |
| Date | Thu, 25 Jun 2015 23:50:01 +0200 |
| Message-ID | <pFnbX-4dP-1@gated-at.bofh.it> (permalink) |
| References | <pFmfU-2SE-9@gated-at.bofh.it> |
| X-Original-To | unlisted-recipients:; (no To-header on input) |
| X-Mailer | git-send-email 1.8.2.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 40 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Nathan Zimmer <nzimmer@sgi.com>, Andrew Morton <akpm@linux-foundation.org>, Nishanth Aravamudan <nacc@linux.vnet.ibm.com>, Tejun Heo <tj@kernel.org>, Lai Jiangshan <laijs@cn.fujitsu.com>, Mel Gorman <mgorman@suse.de>, linux-kernel@vger.kernel.org |
| X-Original-Date | Thu, 25 Jun 2015 16:44:13 -0500 |
| X-Original-Message-ID | <1435268653-167841-1-git-send-email-nzimmer@sgi.com> |
| X-Original-References | <20150625204855.GC26927@suse.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1172475 |
Show key headers only | View raw
In kthread_create_on_node we set_cpus_allowed to cpu_all_mask regardless of what the node is requested. This seems incorrect. Signed-off-by: Nathan Zimmer <nzimmer@sgi.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> Cc: Tejun Heo <tj@kernel.org> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Mel Gorman <mgorman@suse.de> Cc: linux-kernel@vger.kernel.org --- kernel/kthread.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 10e489c..d885d66 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -318,7 +318,10 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), * The kernel thread should not inherit these properties. */ sched_setscheduler_nocheck(task, SCHED_NORMAL, ¶m); - set_cpus_allowed_ptr(task, cpu_all_mask); + if (node == -1) + set_cpus_allowed_ptr(task, cpu_all_mask); + else + set_cpus_allowed_ptr(task, cpumask_of_node(node)); } kfree(create); return task; -- 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[RFC] kthread_create_on_node is failing to honor the node choice Nathan Zimmer <nzimmer@sgi.com> - 2015-06-25 23:50 +0200
csiph-web