From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935156Ab1JEQ42 (ORCPT ); Wed, 5 Oct 2011 12:56:28 -0400 Received: from mga14.intel.com ([143.182.124.37]:52172 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935068Ab1JEQzc (ORCPT ); Wed, 5 Oct 2011 12:55:32 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.68,492,1312182000"; d="scan'208";a="23558373" From: "Fenghua Yu" To: "Ingo Molnar" , "Thomas Gleixner" , "H Peter Anvin" , "Zwane Mwaikambo" , "Tony Luck" , "Asit K Mallick" , "Suresh B Siddha" , "Len Brown" Cc: "linux-kernel" , "Fenghua Yu" Subject: [PATCH 4/8] kernel/workqueue.c: unbound work queue rescuer runs on first cpu in cpumask_online_cpu Date: Wed, 5 Oct 2011 09:39:15 -0700 Message-Id: <1317832759-10223-5-git-send-email-fenghua.yu@intel.com> X-Mailer: git-send-email 1.7.2 In-Reply-To: <1317832759-10223-1-git-send-email-fenghua.yu@intel.com> References: <1317832759-10223-1-git-send-email-fenghua.yu@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fenghua Yu 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 --- 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