Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752631AbcDRNSN (ORCPT ); Mon, 18 Apr 2016 09:18:13 -0400 Received: from mail-bn1on0056.outbound.protection.outlook.com ([157.56.110.56]:43238 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751318AbcDRNSL (ORCPT ); Mon, 18 Apr 2016 09:18:11 -0400 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 15:17:55 +0200 From: Jan Glauber To: Will Deacon CC: Catalin Marinas , , Subject: Re: [PATCH v2] arm64: Reduce verbosity on SMP CPU stop Message-ID: <20160418131755.GA2826@hardcore> References: <1460715876-10780-1-git-send-email-jglauber@cavium.com> <20160415113706.GE22906@arm.com> <20160418074333.GA16109@hardcore> <20160418121930.GH28645@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160418121930.GH28645@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [88.66.108.80] X-ClientProxiedBy: VI1PR02CA0009.eurprd02.prod.outlook.com (10.162.7.147) To SN2PR07MB2592.namprd07.prod.outlook.com (10.167.15.22) X-MS-Office365-Filtering-Correlation-Id: a7ea0958-cae3-455c-5a77-08d3678be25c X-Microsoft-Exchange-Diagnostics: 1;SN2PR07MB2592;2:ido4SQmQ5yWeeGIWDfJ6YVAbQZD+heRFsHjCTUBgGNQ5zGHvK6yFvEkPZvtySTWWskwGr4Xuhu3i7iUAwCByAJl6iqGmr3Km5IfKMZK+MMN20fMYG/USBg16ShxlrfxipSgxljVV8pjtKI8yxv2tNws5o+7yCNVFbIHWPZE4vRB0URGqUg/B6HYqsm6U40qi;3:RqxyaNQS4ShQuCZmh/g7u3rLTqoTVBjF+CL68OMaBQ2EUH8GDeFKKOZgWlws+puVuQn+Jebbm+6gI98o4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R1gu6gAFMPFMQBwhZkOqIv6Fcf/MGo= 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)(3002001)(10201501046);SRVR:SN2PR07MB2592;BCL:0;PCL:0;RULEID:;SRVR:SN2PR07MB2592; X-Microsoft-Exchange-Diagnostics: 1;SN2PR07MB2592;4:7h6tAE6zF5pNDGu6x1oqP8i8+izQH5/hVwfaX92CfIXy2rZvvu8XQv/DAhUj/7f3YGHxAEQL6V95G5oB2gqbIn8u+XCpwiVT7lXsn/dizsvstBJB7OCXEoHsDA5x91VkRCG/ItXjYr9G/LQAo+Udd+lmnmQ37HJTvNIU2PDIEn29zhcNNzTvAfr1u7iD1n3A9fQU+4Q5qPACKYekRSyAqClMyqF1TKAccP3LccqvStRTvwz0bN/nB/V2ZTPNyx3Xs89jFryBM7Yj5dgumko/w2yhOflXRsXzpUUJgyOTek2smn4IItxCCzVnUCoMxRtNvNzTqOjz0P1osjt1tDhJHP46/5Bia+sPsOW4ySYDdBnCh9HGOnuiL+O/jggpg5FFQp0A5plDiu9d0tUr/dwUs9mBBmUgc59At3FRAiM0CNMoso9VR1pWyv4UDfoSMQUN X-Forefront-PRVS: 0916FC3A18 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(24454002)(86362001)(2950100001)(47776003)(50986999)(76176999)(66066001)(54356999)(19580405001)(19580395003)(9686002)(2906002)(92566002)(42186005)(4001350100001)(23726003)(81166005)(97756001)(83506001)(33716001)(110136002)(46406003)(189998001)(3846002)(6116002)(77096005)(586003)(93886004)(5008740100001)(1076002)(1096002)(4326007)(50466002)(33656002)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN2PR07MB2592;H:hardcore;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR07MB2592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=?us-ascii?Q?pDpe+QePOJ/6HmkpCx7ouO7K+Lc0fymDP1uoSYnlkysSXhzNpZhzGeNBbYin?= =?us-ascii?Q?d+LjfsK0RBtO8vny54OQaUqrRJbjpHzZ4Ov4NdgjFMTkXOHYyQsdJ//veCoN?= =?us-ascii?Q?dw=3D?= X-Microsoft-Exchange-Diagnostics: 1;SN2PR07MB2592;5:3A+kA9yK76v08QOosjS5BgiDLEMflWQTFHDkq2dAbYzMJphlZdEj21Vv6jznsP2/MSE0VcUcwVqIaDwi8t47tlDK0EWtJ3NigRlXp9Lz+VkdBftd8V5ZAv78WizFGq2h6d2CWTEjMWB8aV4WK9aBGRcit5vvbRWE7p/q/jpkuZujZeRil/wTMj5uRZAmW+vw;24:kKCBCs8ZqAedFgajOR21G0Cg9tB9uuuctqIow5DuJVKlBAHlV/cn2i5zX35OjRKPs37H01XMZDyVXJLoUlNh4+rIKvF+1jxR9431Y+SVDFc=;7:wmMme4lb3rYT/eYzHG7A3ppVLIh7W/MvxdpCKp/zjask7IHVuwHmupLXdHSO2MXWgWDlzvsPP9XvCOHCd/OOhQ60pber34KVb9gmoI9SHzovoxKg9PA1ghbT0MUWKEN8VGP2bpuyYO6BcrMzxKvGHS2oRzuQkMCll3iemgPAnbvTu63RTccHmxt6ntpqg7dZjfYU09mdS0LV1w0HAsWATtl+0h/+GtiUKsGOKJlZ2FQ= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2016 13:18:07.1908 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2592 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3015 Lines: 94 On Mon, Apr 18, 2016 at 01:19:31PM +0100, Will Deacon wrote: > On Mon, Apr 18, 2016 at 09:43:33AM +0200, Jan Glauber wrote: > > 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? > > Yeah, this looks better, thanks. We might want to clear the "stopper" > CPU from the mask, but it's hard to really care that much. Then let's not do it, the fact that "the CPU that executes this code is also still online" is not too wrong... Jan > Will > > > > > 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 > >