From patchwork Mon Nov 26 10:20:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Congyang X-Patchwork-Id: 1801671 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CD673DF230 for ; Mon, 26 Nov 2012 10:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755136Ab2KZKvz (ORCPT ); Mon, 26 Nov 2012 05:51:55 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:52169 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754361Ab2KZKtv (ORCPT ); Mon, 26 Nov 2012 05:49:51 -0500 X-IronPort-AV: E=Sophos;i="4.83,320,1352044800"; d="scan'208";a="6277340" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 26 Nov 2012 18:48:04 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id qAQAE1QV012892; Mon, 26 Nov 2012 18:14:01 +0800 Received: from ghost.fnst.cn.fujitsu.com ([10.167.225.226]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2012112618133523-63621 ; Mon, 26 Nov 2012 18:13:35 +0800 From: Wen Congyang To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, x86@kernel.org Cc: Yasuaki Ishimatsu , David Rientjes , Jiang Liu , Minchan Kim , KOSAKI Motohiro , Andrew Morton , Mel Gorman , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Tang Chen , "Rafael J. Wysocki" , Len Brown , Lai Jiangshan , Wen Congyang Subject: [PATCH 3/5] cpu-hotplug, memory-hotplug: try offline the node when hotremoving a cpu Date: Mon, 26 Nov 2012 18:20:25 +0800 Message-Id: <1353925227-1877-4-git-send-email-wency@cn.fujitsu.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1353925227-1877-1-git-send-email-wency@cn.fujitsu.com> References: <1353925227-1877-1-git-send-email-wency@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/11/26 18:13:35, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/11/26 18:13:39, Serialize complete at 2012/11/26 18:13:39 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The node will be offlined when all memory/cpu on the node is hotremoved. So we should try offline the node when hotremoving a cpu on the node. Cc: Yasuaki Ishimatsu Cc: David Rientjes Cc: Jiang Liu Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Andrew Morton Cc: Mel Gorman Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Peter Zijlstra Cc: Tang Chen Signed-off-by: Wen Congyang --- drivers/acpi/processor_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index a4352b8..7fc728c7 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -634,6 +635,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) per_cpu(processors, pr->id) = NULL; per_cpu(processor_device_array, pr->id) = NULL; + try_offline_node(cpu_to_node(pr->id)); free: free_cpumask_var(pr->throttling.shared_cpu_map);