Thread (19 messages) 19 messages, 3 authors, 2017-09-01

Re: [PATCH] mm: Use WQ_HIGHPRI for mm_percpu_wq.

From: Tejun Heo <tj@kernel.org>
Date: 2017-08-28 23:09:28
Subsystem: the rest, workqueue · Maintainers: Linus Torvalds, Tejun Heo

Hey, again.

On Mon, Aug 28, 2017 at 04:02:56PM -0700, Tejun Heo wrote:
Hmm... all these is mostly because workqueue lost the "ignore
concurrency management" flag a while back while converting WQ_HIGHPRI
to mean high nice priority instead of the top of the queue w/o
concurrency management.  Resurrecting that shouldn't be too difficult.
I'll get back to you soon.
Can you please try this patch and see how the work item behaves w/
WQ_HIGHPRI set?  It disables concurrency mgmt for highpri work items
which makes sense anyway.

Thanks.
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index ca937b0..14b6bce 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2021,7 +2021,7 @@ __acquires(&pool->lock)
 {
 	struct pool_workqueue *pwq = get_work_pwq(work);
 	struct worker_pool *pool = worker->pool;
-	bool cpu_intensive = pwq->wq->flags & WQ_CPU_INTENSIVE;
+	bool cpu_intensive = pwq->wq->flags & (WQ_CPU_INTENSIVE | WQ_HIGHPRI);
 	int work_color;
 	struct worker *collision;
 #ifdef CONFIG_LOCKDEP

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help