Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936897AbcCQWmY (ORCPT ); Thu, 17 Mar 2016 18:42:24 -0400 Received: from mail-am1on0059.outbound.protection.outlook.com ([157.56.112.59]:34112 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936396AbcCQWmC (ORCPT ); Thu, 17 Mar 2016 18:42:02 -0400 Authentication-Results: linux.vnet.ibm.com; dkim=none (message not signed) header.d=none;linux.vnet.ibm.com; dmarc=none action=none header.from=mellanox.com; Subject: Re: [PATCH v2 1/4] nmi_backtrace: add more trigger_*_cpu_backtrace() methods To: Peter Zijlstra References: <1458147733-29338-1-git-send-email-cmetcalf@mellanox.com> <1458147733-29338-2-git-send-email-cmetcalf@mellanox.com> <20160317193600.GY6344@twins.programming.kicks-ass.net> <56EB3050.3060607@mellanox.com> <20160317223821.GZ6344@twins.programming.kicks-ass.net> CC: Russell King , Thomas Gleixner , Aaron Tomlin , Ingo Molnar , Andrew Morton , Daniel Thompson , , , , Paul McKenney From: Chris Metcalf Message-ID: <56EB32A6.5090203@mellanox.com> Date: Thu, 17 Mar 2016 18:41:42 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160317223821.GZ6344@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [173.76.23.146] X-ClientProxiedBy: BL2PR01CA0035.prod.exchangelabs.com (10.141.66.35) To AM4PR05MB1682.eurprd05.prod.outlook.com (25.165.245.153) X-MS-Office365-Filtering-Correlation-Id: d0c83209-e8d4-4b33-7fc5-08d34eb558a0 X-Microsoft-Exchange-Diagnostics: 1;AM4PR05MB1682;2:v60GfONX0u7wq7YblIoT01/RvFwplmHCR5kJSG8CVstgz5rMdPxb4WOyQz4B70QCM/JTlmFdLczee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tJh0eVgeTh3uWnbCAfUqCDMUi9ZrxenaoCyyprwrd9W2XE1cp+UK9p1qrdGnnk7UXTE2BruheAl/7Ow2A8+5sdqjlwhEDG31tlqWxgBRS9f2LELLGXM7B41qVCN7dmEVzFnR8GZpWNyuozUC47BTcZKBJZ+oZ0qpTbIEM6uoEfpP8ggpqg7mO/aM2ZN6TyY39DRqu2I+6T7paJqsxCqsN/n+ViCXeu6hoIhWli9G3sWofLb/u6abPBow4HygOx4WmTgNkLscp+r4fvpJg/Unu8MXnDLl2yx8lrJiW5zPClE3YzdKz4XG33AhAPLTqWL/TuBf6LfktIKb6eijB9qZ7cV06Uc7g368hNBYs87CVisA+NTKoxrrzgLpGlOTbj6ytiz+;4:D09wjrDxbrhZRGWoXhrALlmCTtfQz0YSYKKrLr5QIkUP18Dm2AZ/Vors32H+Y4BNrC99saSDHVklEOhQB4alYxACHoWRLGcqPwTRMT4Vq4VJ/1usINZvvXOhh7Hcy16jnzlnd38KAw+8OgqQTPcfNoi/5azckym65PEwrXF3dJRloZl6kGETXpF+RXcJ71cWkgRQ57pdKyOYuPnUbPRA7gkmA57J3aX64gpRm7sXQOELBlCbkASeb68mEQ5vcMRW74R8zoqs5/FQSwSKJEUjv98uLsziXi1lluCyZb5PV379jlphAkVI0etT+iKSJ3mZTl5f50KqTct3FqfllLwlpGdxvdYq9yk7zlBVupkIV8sCn4UO7n0Gvv1SfCJ4rCkB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:AM4PR05MB1682;BCL:0;PCL:0;RULEID:;SRVR:AM4PR05MB1682; X-Forefront-PRVS: 0884AAA693 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6049001)(479174004)(24454002)(377454003)(3846002)(6116002)(1096002)(4326007)(5008740100001)(2906002)(59896002)(117156001)(23746002)(42186005)(77096005)(189998001)(15975445007)(33656002)(110136002)(50466002)(93886004)(2950100001)(230700001)(5004730100002)(586003)(81166005)(19580395003)(80316001)(4001350100001)(64126003)(92566002)(54356999)(76176999)(50986999)(65816999)(86362001)(65806001)(66066001)(65956001)(83506001)(36756003)(47776003)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR05MB1682;H:[192.168.1.158];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;AM4PR05MB1682;23:wpI+lqCQpRC/2Yx/PrKoV62OGPzd8ND37fUxh?= =?Windows-1252?Q?D9pcqmY3CSxM7orqdCfqtpCoTWCtGT9wUH8j2EqbzzdhoaqMQj/qHgjU?= =?Windows-1252?Q?72/H7sa7RBzBDPUl5VuiYuTFe7+FxvNl+UedUqCyELiqxy3znmNz1RaX?= =?Windows-1252?Q?Lwv7FOxxDDV7tCQYvWADP9a7FRvku4XeSizVTvfg29cqdnDXvM01IceL?= =?Windows-1252?Q?XnsxdiScgRhdUej6Y4nISf31yaT0bE9O5Fsod5omjM6QkUgSyXuDCEzv?= =?Windows-1252?Q?t/FruNQrpci1qYAxNUd7FndZ7WWZK5rY/a6Nf69mc/FXcJziG6GQ1oUr?= =?Windows-1252?Q?SNLruGf9jj79XByBDaqz6ZiBjgh34jiVvkQ/k2MMQFe++MTxiWzqE/LJ?= =?Windows-1252?Q?SmTMKbuKkyU5FUAnfB7ahqyIHG9WMnWomoLtzkb5wD3VDOwMHK3U6ulx?= =?Windows-1252?Q?KUG/8mrMcgMl4pjsrkP+jTdU00p1m4m6Jso/h+PMnnny/WbhtdkoxdFd?= =?Windows-1252?Q?IwZXGiicgiAhgTTKTq3/G2Vvh4f1I8aaeEgw4az244b/s43bm+wUskpz?= =?Windows-1252?Q?DWtiHY7G+MNmFzqQBIv/DZkzNe7gH/OoqBuXobQgM3Wfb+n80EOyNTDU?= =?Windows-1252?Q?gi7G3b549ZuJxdGDFmt2E1oo4MpG1CJrZeb7EeRo2rzPMcgfxv44B7xL?= =?Windows-1252?Q?+rPofui40GMtqLHHA82xeSgWxJtVw7KDKpAqKqcn29hUN26N+uMKdKC3?= =?Windows-1252?Q?4i+NLp1T6grz5wy6e6P5gtwQCQKZLwZKdUB6Pk065aon7PBginDJjYR7?= =?Windows-1252?Q?gorUWKyEBy9Lf7Mszy2ZZOf3SzI1ZrbLnzWfxi9nBU3SfknCHabCeJP5?= =?Windows-1252?Q?51lZ3OW4198GUCPTH5dSUc9LMhac/Z2y6k8AOgbxuj9TrPhSdUOr23ak?= =?Windows-1252?Q?BANfz5O4ZAucnC+51G7kCDtSozbV6Ufr/VRME02QZ2+SqKNNFlQivyj+?= =?Windows-1252?Q?lFCSiSyHs4vr/ouotKWvAR9NQu/ZvT07p4yQeN+JC8EVArhVnEm6MnQA?= =?Windows-1252?Q?6AANAhaXOMy32mx4jpmEyprStNagDoljRO1XWAB2QCnQOugBdCwQGl5K?= =?Windows-1252?Q?WJC8snHns4ZLbtzwubj2EVQBSdan0MCRB0vsYmMIdVGlj4BwOOxAEDu0?= =?Windows-1252?Q?KY2bl9zpIKsoREYdneeiHgz10EGz8KSr0fP/jnq4Uq9Zr5AyRQeJFWTG?= =?Windows-1252?Q?RfX6UZ1MH3kApLM2QKjQZjW9sYrOaJmtcWWOJA=3D?= X-Microsoft-Exchange-Diagnostics: 1;AM4PR05MB1682;5:t3Az0Mal1HPY+bPQWHUU9KR9HQPrAqYSWwpm/88KBivM0l2ktqVTIP+XvrIh4xjPhwk01SWaLK822XjO5K0RVe9Nwejzz8VUzt1V/F+tgzB9VfRGV9jH/1buHG6QsJlp//Pmnxt+PgY6mGgieENiWA==;24:JfvFU0quO3b2pAPDuW9eyn7q1WmLHP1MrUt773pDqTiz/81JTN6rdbS7kLZBZUzytUgur6Lu5BrLii+I+Hr9W97fYGm2JZtICurvLRT7psw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2016 22:41:55.5925 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB1682 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2226 Lines: 47 On 3/17/2016 6:38 PM, Peter Zijlstra wrote: > On Thu, Mar 17, 2016 at 06:31:44PM -0400, Chris Metcalf wrote: >> On 3/17/2016 3:36 PM, Peter Zijlstra wrote: >>> On Wed, Mar 16, 2016 at 01:02:10PM -0400, Chris Metcalf wrote: >>>> Currently you can only request a backtrace of either all cpus, or >>>> all cpus but yourself. It can also be helpful to request a remote >>>> backtrace of a single cpu, and since we want that, the logical >>>> extension is to support a cpumask as the underlying primitive. >>>> >>>> This change modifies the existing lib/nmi_backtrace.c code to take >>>> a cpumask as its basic primitive, and modifies the linux/nmi.h code >>>> to use either the old "all/all_but_self" arch methods, or the new >>>> "cpumask" method, depending on which is available. >>>> >>>> The existing clients of nmi_backtrace (arm and x86) are converted >>>> to using the new cpumask approach in this change. >>> So the past days I've been staring at RCU stall warns, and they can use >>> a little of this. Their remote stack unwinds are less than useful. >> Were you suggesting this as an improvement for a possible v3, or just a >> kind of implicit ack of the patch series? Thanks! > A suggestion more like. I've not actually looked at the 4th patch. > > I'll try and fold the patches into the runs I do tomorrow, I'm sure to > trigger lots of fail. Maybe I'll even do that RCU patch. The build bot caught the fact that I missed arch/xtensa since it doesn't use LOCK_TEXT, so if you're testing on that (ok maybe unlikely) you can add this: diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index c417cbe4ec87..18a174c7fb87 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S @@ -93,6 +93,9 @@ SECTIONS VMLINUX_SYMBOL(__sched_text_start) = .; *(.sched.literal .sched.text) VMLINUX_SYMBOL(__sched_text_end) = .; + VMLINUX_SYMBOL(__cpuidle_text_start) = .; + *(.cpuidle.literal .cpuidle.text) + VMLINUX_SYMBOL(__cpuidle_text_end) = .; VMLINUX_SYMBOL(__lock_text_start) = .; *(.spinlock.literal .spinlock.text) VMLINUX_SYMBOL(__lock_text_end) = .; -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com