lkml.org 
[lkml]   [2011]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/8] kernel/workqueue.c: unbound work queue rescuer runs on first cpu in cpumask_online_cpu
Date
From: Fenghua Yu <fenghua.yu@intel.com>

If work queue is unbound to a specific cpu, run rescuer on first cpu in
cpumask_online_cpu instead BSP which could be offlined.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
kernel/workqueue.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 1783aab..d26e411 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1496,9 +1496,9 @@ static bool send_mayday(struct work_struct *work)

/* mayday mayday mayday */
cpu = cwq->gcwq->cpu;
- /* WORK_CPU_UNBOUND can't be set in cpumask, use cpu 0 instead */
+ /* WORK_CPU_UNBOUND can't be set in cpumask, use first cpu instead */
if (cpu == WORK_CPU_UNBOUND)
- cpu = 0;
+ cpu = cpumask_first(cpu_online_mask);
if (!mayday_test_and_set_cpu(cpu, wq->mayday_mask))
wake_up_process(wq->rescuer->task);
return true;
--
1.6.0.3


\
 
 \ /
  Last update: 2011-10-05 18:59    [W:0.569 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site