Re: [workqueue/driver-core PATCH 1/5] workqueue: Provide queue_work_near to queue work near a given NUMA node

From
Alexander Duyck <hidden>
Date
2018-10-10 15:34:08
Also in
lkml
Reply to
Tejun Heo, 2018-10-10

On 10/10/2018 8:30 AM, Tejun Heo wrote:
Hello,
quoted
+static int workqueue_select_cpu_near(int node)
+{
...
quoted
+	/* Use "random" otherwise know as "first" online CPU of node */
+	cpu = cpumask_any_and(cpumask_of_node(node), cpu_online_mask);
Maybe we wanna round-robin within the node?
I had thought about it. It adds extra complexity to do it and for unbound work queues it doesn't really add anything since it gets converted back into a node anyway.

If you wanted I could look at adding extra logic that would do the round-robin for non-unbound workqueues. I just wasn't sure if it was worth the effort since the current users are all unbound workqueues.
quoted
+bool queue_work_near(int node, struct workqueue_struct *wq,
+		     struct work_struct *work)
Can we name it queue_work_node() to stay consistent with numa-aware
memory interface?
Yes. No problem.
Thanks.
Thanks for the review feedback.

- Alex
Thread (9 messages) 9 messages, 2 authors, last reply 2018-10-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help