From patchwork Mon Apr 18 07:43:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Glauber X-Patchwork-Id: 8868491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EB61E9F441 for ; Mon, 18 Apr 2016 07:47:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 031D0201EF for ; Mon, 18 Apr 2016 07:47:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E93B320259 for ; Mon, 18 Apr 2016 07:47:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1as3sd-0006if-1C; Mon, 18 Apr 2016 07:45:59 +0000 Received: from mail-by2on0087.outbound.protection.outlook.com ([207.46.100.87] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1as3rt-0004rj-4k for linux-arm-kernel@lists.infradead.org; Mon, 18 Apr 2016 07:45:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=q7rkoveURjKsowvxpZHCenb1wabM0x+ze10kFEjwjkg=; b=hg0MXQI1Uycz8IrmDU2WHbk1Xm7HCiQYawUEMWnlC6DxbearyZe4DYB3/S6tq6MoDxl07S9imzau9ILHabh8GEZYOzqFkEizRzJpKR9+ahk0DOIkuGsjHfJC48zxtzl+WXMjR9UZm8IgAexxP2wJy2Onygt1axKJPxnC8E2g0vQ= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from hardcore (109.193.44.123) by CO2PR07MB2584.namprd07.prod.outlook.com (10.166.201.23) with Microsoft SMTP Server (TLS) id 15.1.466.19; Mon, 18 Apr 2016 07:43:47 +0000 Date: Mon, 18 Apr 2016 09:43:33 +0200 From: Jan Glauber To: Will Deacon Subject: [PATCH v2] arm64: Reduce verbosity on SMP CPU stop Message-ID: <20160418074333.GA16109@hardcore> References: <1460715876-10780-1-git-send-email-jglauber@cavium.com> <20160415113706.GE22906@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160415113706.GE22906@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [109.193.44.123] X-ClientProxiedBy: DB5PR04CA0029.eurprd04.prod.outlook.com (10.164.34.167) To CO2PR07MB2584.namprd07.prod.outlook.com (10.166.201.23) X-MS-Office365-Filtering-Correlation-Id: 034323e7-5046-4be8-c9ee-08d3675d2dcc X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2584; 2:043n4aNuWXs8jXWJoxQBjmldY+wE6u5b8TaFglvNHE7uwsS2JdqsJR1TN/wxHUG36WAG6/ns/jVceDff54F70+gmabWcagAMHwVxKu/qF4Dfyo7T4hqXUdPOHcuGkfEDkjPAVe3lwfmc9m82eH5Rku5pReLiWxBeQk5+pLHL8YXYaPE0UyOYOTxDMZYxRI+b; 3:RiJol7/DT1WhDYgGZFR9hsmSsLTXYr1MwG+auUu0Bhki7uRDHjhrnbSCf2owgclaokVUQtOi3SPwuVEPOEocXqVhTlwwk+8zj364GrhGRWVgWmVaEy1OCr4FApLdN+gB X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR07MB2584; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2584; 25:guuOarW59qczPU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ZZb+WrtZ1NJvCuSYGf9oRK887f8cxrHJ/oGD1fX9zNvIA90R7RWkdO30ay1ImGCmzhoVx4eHrSOScdEhcafjjrIk+RV22iyh/k2KUeMDkLOpj6wd3+g6xCCYwiJl3+01ZRReAjFoOEsyulePZ0Yw35q45omWl0JLAcs9Kn0hzYRIMZKUs9X6n2/z7KTqXC/L2Y0ibbMJht9QyD1Ln8qAOtk3LyPIEcj4gBRrLBE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(209352067349851); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521026)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:CO2PR07MB2584; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2584; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2584; 4:rQ4WjcOxASCz2vXIW91O86PZVZ5twcOL07n2K5znCjqWbiHaYC2lV+ma6ejfY5NsY0Em8MWF5MJfnGFcwjbhDB0xs1HJG747YNeeQDyqMhnAtEjNEU0p+1/Ffly0JaCKUrtMZrtxGNX0VlkvzzkuOeEUL/2cJOqWHQCKKi4DODXmvhYcHJb+32Hxj7eNgDWgU7gX2IvicM0NBKMKKLuyPBtAsi+yZzfxW2PyhTgp5b8dJmcRLdPr+0EVqOmfGgyHAPk3yzV/2799JjCrrMBT25qQz+27J8FtFKLVYmFiGNigjkilBeSw6+O9n0FVzv7wyyghEqmCiYX3F2Oon8e66C9hIcTIJMlzQP6NtjwWaj6Qp0dGAORk9iN+hqqAWcTuddiCr4cT5r2kJPoRBT9AOUixh4wH5Yat2CyhVme7znzZhqC7t3JNAvUdj2rnvzm6 X-Forefront-PRVS: 0916FC3A18 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(24454002)(3846002)(5004730100002)(1096002)(1076002)(4326007)(5008740100001)(6116002)(23726003)(586003)(42186005)(229853001)(81166005)(77096005)(2950100001)(2906002)(9686002)(33656002)(33716001)(66066001)(92566002)(97756001)(46406003)(189998001)(47776003)(110136002)(50466002)(19580405001)(19580395003)(4001350100001)(54356999)(76176999)(50986999)(86362001)(83506001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2584; H:hardcore; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2584; 23:LQLEuC6BW3aw9TXBZnZ6YTU8Cxza6WQzclG2Wb+Zp?= =?us-ascii?Q?ViMTleclEuYtpk79PwyZ4GMbtfcVW/Ig5UVDXibZKGQXCcGhOIPLW8wAm+xX?= =?us-ascii?Q?iW1LLw69ceuS5auI0jXhYhm66nhbu06gPJA6giCYKEMJAwHcesvOrEvcTS7X?= =?us-ascii?Q?xmA2/khYSZlO3S2IF2Ju0IonCry38qeCUruloVukbXw2yYmE+2GfvPQaNWJ2?= =?us-ascii?Q?adDY9A8pmsIilVat9PrQncjZk1J3rRUV/jQPAwEeSq+V9G2dcQVofk+GgL4V?= =?us-ascii?Q?SCuPjmH0mlRa3PQOGqj4E7UX9J98f59aq0/o75TgXW5/vIi1tpf9l/zqD70L?= =?us-ascii?Q?f8vWS+1kQ/dcEUq8DTeqb37nTNiHEgglBcYoC+iHDHEmkktNMHBhQLlnOQZ3?= =?us-ascii?Q?/vTPp2dmy4QypskScwOjjqvd10RPRQIqHqs6UwWsfwJLHyOS3veBbdD6/LEp?= =?us-ascii?Q?7pWIUZwWOjYxBqkOlkQ0Aa8RBWD7As+EwgPmB0PVBDVvMDOjI3bN7UhjWBgx?= =?us-ascii?Q?j7BcOmgdy8sgljXFmGvSUrqEqj3OnEEpslm7gaI5xlz4QLkfBQtIyhyVUuhI?= =?us-ascii?Q?R9kq1iBXOAjgl+3uIOnSEQiNid/KdwDUfIZs2InaBJf3yl7xIWbJZqwyegH/?= =?us-ascii?Q?Vwn5VpO30RRUJjQtbDiAmU6W/N5gO4THAdjtf/jiiVEFTbSoQaewnAvlLTXT?= =?us-ascii?Q?DgTwRsCM/gZsF0D7y/P5KxTY2y8iv2utbxtMEoa0VizB3a4ItaVi7w7O24yN?= =?us-ascii?Q?Ae6xOz2kG+STBbUgHhmNeZkFMLBpZAHHBRd64DV2VYd8GXSwBKhVXP8rrkkq?= =?us-ascii?Q?TPtUzXK/2SvgOC/SUtijE+5+hidsYZoge+/zCC9slXmvvSmsbZKg1YWltCO6?= =?us-ascii?Q?lI6orWMolrun0nWFpZIOlc2bMWEo35YYI37ZX1mKs7t4ishz5lyRGgtBZsPs?= =?us-ascii?Q?miZ3JXUcvbzTl6v6wCsCRCeJrFr8oEERiysG1l/M6mtAg8aZxI7PvI2xrzyq?= =?us-ascii?Q?Ac=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2584; 5:4R84Cb+xml8kmjO2denjOkndzvbzF1pBy20PgeHaeZ+EGeaam9WNk7IdRQsnMJRack83kbjfFZB1gSSiPY+CCB+GKtz1iGop9eJkA+q+Ui8zAzmTfWvoi2hGWN6wNsjOF08JoTuj8UvJ3a4tXUObI5UHc5yZnRoiPryyQ7OUp1uACVoXS+gcH6iNgf0UJQXU; 24:Asus+xZynXv3LVvZ8mHy4Lo7UINDEy2ZShcfJTzROn72Vk68YK5JNBKmD6/eSHSDSfYd4dZtOPuDSY7bjL5NyGGn3uKn8J71PsykBtjoegI=; 7:ajQ68s0NjWB/fwQQedifwZywT0MLDfyCOJiQxHwwvMaNhHRCwOX5H2aRc2h6kKeROz/MLVicN6ScdJX2JYAkSxs/Q/Y6klhHHOD69Yr8mThpxXsHf81zBWJRPNag4ARWpy/MRX1G9QOqbglpShf/0d//3gEnEJCqz/boTb6sZYLbyK5wkWqPjbbTU/oTKz4+jd2ipeyyYm2PWKJDbItXxda74foC9BQYFpogxu+XtM4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2016 07:43:47.5199 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2584 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160418_004513_411492_01B66B9B X-CRM114-Status: GOOD ( 14.00 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Apr 15, 2016 at 12:37:06PM +0100, Will Deacon wrote: > You can remove stop_lock altogether now, right? I also wonder whether > it would be worth printing out which CPUs are still online in the case where > we fail to stop all the secondaries? Sorry, I've been a bit offline. Yes, the stop_lock can also be removed. How about below patch that prints the CPU ids for all CPUs that failed to stop? Jan -------------------------------- When CPUs are stopped during an abnormal operation like panic for each CPU a line is printed and the stack trace is dumped. This information is only interesting for the aborting CPU and on systems with many CPUs it only makes it harder to debug if after the aborting CPU the log is flooded with data about all other CPUs too. Therefore remove the stack dump and printk of other CPUs and only print a single line that the other CPUs are going to be stopped and, in case any CPUs remain online list them. Signed-off-by: Jan Glauber --- arch/arm64/kernel/smp.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index b2d5f4e..29f4e37 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -763,21 +763,11 @@ void arch_irq_work_raise(void) } #endif -static DEFINE_RAW_SPINLOCK(stop_lock); - /* * ipi_cpu_stop - handle IPI from smp_send_stop() */ static void ipi_cpu_stop(unsigned int cpu) { - if (system_state == SYSTEM_BOOTING || - system_state == SYSTEM_RUNNING) { - raw_spin_lock(&stop_lock); - pr_crit("CPU%u: stopping\n", cpu); - dump_stack(); - raw_spin_unlock(&stop_lock); - } - set_cpu_online(cpu, false); local_irq_disable(); @@ -872,6 +862,9 @@ void smp_send_stop(void) cpumask_copy(&mask, cpu_online_mask); cpumask_clear_cpu(smp_processor_id(), &mask); + if (system_state == SYSTEM_BOOTING || + system_state == SYSTEM_RUNNING) + pr_crit("SMP: stopping secondary CPUs\n"); smp_cross_call(&mask, IPI_CPU_STOP); } @@ -881,7 +874,8 @@ void smp_send_stop(void) udelay(1); if (num_online_cpus() > 1) - pr_warning("SMP: failed to stop secondary CPUs\n"); + pr_warning("SMP: failed to stop secondary CPUs %*pbl\n", + cpumask_pr_args(cpu_online_mask)); } /*