Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752426AbcDRH7O (ORCPT ); Mon, 18 Apr 2016 03:59:14 -0400 Received: from mail-by2on0079.outbound.protection.outlook.com ([207.46.100.79]:53158 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752363AbcDRH7K (ORCPT ); Mon, 18 Apr 2016 03:59:10 -0400 X-Greylist: delayed 918 seconds by postgrey-1.27 at vger.kernel.org; Mon, 18 Apr 2016 03:59:09 EDT Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=caviumnetworks.com; Date: Mon, 18 Apr 2016 09:43:33 +0200 From: Jan Glauber To: Will Deacon CC: Catalin Marinas , , 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-Type: text/plain; charset="us-ascii" 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:guuOarW59qczPUqhXjBpzI4+utBRuzg5cj2s/VBG2z9GR7QI/Hf4gZ0+YiUjrtyw7V7yNA5i4ogaL4YGJ2QGVJVXBeclzSZsy9p4+rQ0YgQGZHZ8AcO7VGFOFOv/kCt8gNdGpinkbyUAFouOi7OzWDcvnuuwCuM17pByQf9NGbaANXiqB4S0CuAIm8zG9jomeASJc3SSW/Etye34sz/RGqBAH+L7Wyek2pw/eEIPJ6ZEx3bz2Gjws0VV5WRo7ODTUjZBzVzqNIFanX9AX287D85i3cA021uidPIVNcTtOIZlAF4+b9yT4FSzngkCmRVgwQ9p+y8SoyEdxiGI9+p3jg9YcLobwHZNv2MWWzCCyVaAapePA/vNJPVhKzBQp0xigJX70fjUuI2sWD8fgoBdE/SBw9bTplirsG/jaipAoBVHuvSwDI/Vea1Oy9BL4P4AFWMRa0pbXAThbYiRKUnbPtW8yB8pILIoKhT0K6n9/LbmwIX/IwGz0IdspB+2KlfOayMywkd/MZ01yOcqHZWvV0sWo1n1NNwHRcPXJxvMswPtsro1reMBqW1iqwgVIMULWq7tiGmquw7ioHTj8qhW2zgzFAGfp3vK1F9uJH0FT3pvDdw5RF7Wu33UvR98QLGlUUvRyouTCspF5QKe6gkvUw== X-Microsoft-Exchange-Diagnostics: 1;CO2PR07MB2584;20:7E9YULxmviMU6DOPFNo8dotFDSjVYvjAD3FiGwfbiYg24ZfD8hJs3KiabSHFX4nNPNhi4kt1y01c72EpvFlJN33RkQhsefAl9+sDdT74BNgiu7K+bY81DWsqso6A8vhoQxE+gaU6XUoUzJG1J2/K0vg27EUR6NKS9jqY8kuL4ee9mLLm4myWOxrh2qK5wlYpvbetK4yI2RQpKarvM7IJxMfXCYicqDJbEIrusA7Rf/Xg/joR0uzBTeKLrC07+5QFm4zB/2WemOpHAc1k6LMLRkd1XIq6Vf7vUhbttujsQwe6LVqOD5fLrLi8x1Vm6bM14+JXMIvgs/dAyeKBAlkir9WfYEAsdvR2GH2cfNEMPxNVJjNjAEwxzG+MjxZQjL+0pdO1ZZb+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?j7BcOmgdy8sgljXFmGvSUrqEqj3OnEEpslm7gaI5xlz4QLkfBQtIy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+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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2305 Lines: 79 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)); } /* -- 1.9.1