From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730AbcGNAS2 (ORCPT ); Wed, 13 Jul 2016 20:18:28 -0400 Received: from mail-db5eur01on0084.outbound.protection.outlook.com ([104.47.2.84]:33205 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751678AbcGNASS (ORCPT ); Wed, 13 Jul 2016 20:18:18 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=cmetcalf@mellanox.com; Subject: Re: [PATCH v5 0/4] improvements to the nmi_backtrace code To: Peter Zijlstra , "Rafael J. Wysocki" , Petr Mladek , Russell King , Thomas Gleixner , Aaron Tomlin , Ingo Molnar , Andrew Morton , Daniel Thompson , , , , References: <1459877208-15119-1-git-send-email-cmetcalf@mellanox.com> From: Chris Metcalf Message-ID: <96e5ba5b-d8c2-42cd-11a3-ffebd85522c3@mellanox.com> Date: Wed, 13 Jul 2016 14:44:17 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1459877208-15119-1-git-send-email-cmetcalf@mellanox.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: CY1PR04CA0037.namprd04.prod.outlook.com (10.166.187.47) To HE1PR05MB1689.eurprd05.prod.outlook.com (10.169.119.155) X-MS-Office365-Filtering-Correlation-Id: 6d2ab994-c2bf-44d4-dc40-08d3ab4dbcbb X-Microsoft-Exchange-Diagnostics: 1;HE1PR05MB1689;2:JkYBIc+mR+4DSQyJMzXpzzmkSaCGsTPJbb23+HEYP3noOJKrZqG3JEzeAhPEJhG3KoJTcpGnpe3LGvuI7KFnPZDtwG//6BijEwiAHkD+wIoECInPgZAoYslmeS0RMJP0JSETY1Th71hHwm1rmXR9u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2Cf5p5OJczS5UR+FNeac61ebR/OeS6jKQAdWXrSwVSTAzC3nTYUlv16PsWkOr3W0zFdt/2LWo1kSbvCRYeN7ft3ghacNwmH6vQOhcBCIAbIvcU3XeY9AMua+nXrGdYqLCValN37hj3nmT45Mq0tyAy/Gls5OV9K6kj6LpxdJ8UF7S/57MOl+uPW5MxlYMsNPsi4vu+mONsJF0fOr/mH+HH4PwlXwgtdf/YvJqzVZh6wmwLxVn7H/exlf/i6pO2pTvdMf3twfrimsFch7ipIf4wZJFbgMXP3k7STtwj98Ikx+VO+LsrN6BiXQwecgd5q35fX2k6U+2rptNk/fIFYQkUQdf4vgi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(171992500451332)(100405760836317)(42068640409301)(84791874153150); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:HE1PR05MB1689;BCL:0;PCL:0;RULEID:;SRVR:HE1PR05MB1689; X-Microsoft-Exchange-Diagnostics: 1;HE1PR05MB1689;4:djeyfVolv1kJssTkmcb7O+b33IoTBQx4wuTR7X1maPg9X0nRV+rk+AWWCYQNHw19bfWhwXF/iuiBh8LDD7R9o62yzztKBIDAXwWrdIFoadc/S2CToeP8XuuYv8v7id9+S/whyT9FuUPavmRrfvme/7GJNzkyKRTY5L9gpzL7wZ8aEPJWhDOoqBEKgdHbHioGWxSDFL4c4+WZ3GhMZwIb4XBmnT3N2WY/hWbj+bhWjcaymLQNNKP9S3dYayXzmJ1ukZddZQ+aVdSB0xi9o9AhTjjleGFf0vU566PG01QbXyZBJ7X09yGeZO8Vz13nm4V5ERvQDHeWc9jGUWIblWax5WC/Y3ovKD3yKByAijGKfWMp1nD7qsUyjOXaG8kJeIgdKAsekf3ECqsIo+IaLlgisUdDXzt+tNCWleAn695ZRCXtUnWhQ+MTp551RXHgEyt4drGRpKlUFyglS7S4ddjIMXC4Z2lYw+GbCl8zJWeqCBwyiOaQo3A1OpZ262pFluszHid3C4XnV+/kTWpgWmOvj22tUzBYbXMz+awIAtu7q1fXPIBm0UQhNYVZ+yq634uE X-Forefront-PRVS: 000227DA0C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(377454003)(189002)(24454002)(47776003)(2906002)(7846002)(64126003)(7736002)(83506001)(8676002)(105586002)(4001350100001)(65956001)(305945005)(66066001)(23746002)(15975445007)(36756003)(230700001)(65806001)(19580405001)(19580395003)(33646002)(81156014)(81166006)(2201001)(586003)(50466002)(86362001)(50986999)(54356999)(101416001)(31696002)(3846002)(189998001)(6116002)(76176999)(5001770100001)(107886002)(68736007)(92566002)(42186005)(106356001)(77096005)(31686004)(2950100001)(97736004)(65826006)(921003)(21314002)(83996005)(2101003)(1121003)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR05MB1689;H:[10.15.7.181];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;HE1PR05MB1689;23:XHR/CWbJPfNZCZFmOBkCIMGYHy7IPkP5vhPRI?= =?Windows-1252?Q?f3tfmioKOdZKhR93d1Z+u2iF6uEQio244GoEPqN6aAJvyBYdSVwefDcB?= =?Windows-1252?Q?z1VvVh3dH+oAfFceEihDkg0PpjrN49yiGfbYyvtD9P5wdc5TBPRsC7o8?= =?Windows-1252?Q?ZKYM3tVtRaGURmXM8HPLQYFkQhX3eQELFsz340iKN2h9bg/h86SbBJ5k?= =?Windows-1252?Q?Cg72btasJKOdHb06WQ4/4CZBLTHS1pQY/ddCaWUWiB4ZZdcCZgasd4P6?= =?Windows-1252?Q?H0nhMkdApddf/LtkuY01NOlw3GO7Wg4JaRmoKrZE1/Du5hVlB/BAIBgy?= =?Windows-1252?Q?oWUo2i40YttDG4o3vfGQedV1V0uCZM5NALeZLgPcOib5Z83BhMYbMOB8?= =?Windows-1252?Q?OQ9Y2HkXvD+AyxIugHZmTad0vJzx90MFLAMK1C9Ul+379qhLswJHBKI/?= =?Windows-1252?Q?FrrmxbDbrLoTGLK3FdzLKoZKEMhkZP/TNa6ygdFQeBVZWcZ8LTQCubvl?= =?Windows-1252?Q?1rSGM4lB+ghAhVWpkcXsw9XWAUvrvIve578p3enP5FhXEMezZcB1de83?= =?Windows-1252?Q?kLjXu5IIMKjj1/Sv+0SzsxGtj9hd+HE8e0q/PY2lW5szwKmPkM8XGti5?= =?Windows-1252?Q?A3eBCw75EjpQTzCC0u6mVCcngWn15rAo18aLXJlqKg2qcOu/iy3uBLt5?= =?Windows-1252?Q?3ANE/CLSR7E/4kCNW0sUa1er9CBQfqmVmzORA8ojq6OpjvBzYPtURTec?= =?Windows-1252?Q?IXRx0ZXgr37O9X63nimSzOHhIMOBdRYX+UJ2lusvSw7NVWHCm80Hu7w6?= =?Windows-1252?Q?LEMs2Lll0Kj1etUvb9YXdtGBiccN7E5hrhdfepI+ls0OAOxw8DAH1EHY?= =?Windows-1252?Q?dxNA7dHKsnmDMgMZbsK6cgRgHu5RM3SSbiYnE/a3T30ji8dYt2rf0ljE?= =?Windows-1252?Q?TR5z24aGHTdi3quJ6XoU+gwCQHMCb6W3D9dcB9mbHEXsEdyQdiibHww0?= =?Windows-1252?Q?bI0pYEFjLjqJn1tMHN1t7RAHnTp8P3PBqrSLdJXfVjwxOKMFiy+LKUb0?= =?Windows-1252?Q?4UwkpVjAwVGN7xl21IfMpSYPjhta6YOk4068KwZnXefgveoz5yBFWXEj?= =?Windows-1252?Q?w6Rjnnzt03F3j+1azefnC+nhW+Vve5o9Ps+a1exZdbZrJrsHY2U4EQlU?= =?Windows-1252?Q?8CWyyXq8P4Ba2hvF0kgIM2rLa4+CCpbSMiDrXFQ6sZODO8HJrzamxYPg?= =?Windows-1252?Q?cAP516dZnSdGfD+Op+DoQHOctWrgJjMHXP+LmSqS5HkABCFXZ7TjqjLX?= =?Windows-1252?Q?VZnD+o3m3L08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dtMPIp671tnkC+fzV5ZamFMS8A0ELPb3X+FHIobm+Glo8DSPGUTFQtdg0vN6i1bYQhsFRUX9XnpYpZc9+J68cehg+LYKWakZzm2bAJ9pyN2GT2p7bSDhyTi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2016 18:44:32.0612 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1689 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping! I just realized that this series [1] hasn't been taken into an upstream tree yet. It probably makes most sense to go via Andrew's tree, given that that's where Petr's NMI printk cleanup patches went a couple of months ago, for 4.7. It seemed like this patch series had reached consensus in its current form. Andrew, if I rebase this on 4.7, do you want to take it into your tree? Your concern before was just that it conflicted with Petr's work [2]. Thanks! [1] http://lkml.kernel.org/g/1459877208-15119-1-git-send-email-cmetcalf@mellanox.com [2] http://lkml.kernel.org/g/20160229164956.8613016895bef966b6460081@linux-foundation.org On 4/5/2016 1:26 PM, Chris Metcalf wrote: > This is just a one-line change to the v4 series, to catch the new arm > vmlinux-xip.lds.S file, which I missed when I rebased to 4.6 for v4 > (my arm config for testing did not include CONFIG_XIP_KERNEL). > Thanks to Fengguang Wu and the 0-day test robot for that. > > Whose tree would this go through? I have an ack for Peter Z for > patch 4/4 and no other feedback for patches 1/4 or 2/4; I can > certainly push 3/4 through the tile tree myself if that helps, though > my guess is keeping it with the rest of the series makes more sense > for tile since it doesn't lose any functionality that way. > > From the version 1 cover letter: > > This patch series modifies the trigger_xxx_backtrace() NMI-based > remote backtracing code to make it more flexible, and makes a few > small improvements along the way. > > The motivation comes from the task isolation code, where there are > scenarios where we want to be able to diagnose a case where some cpu > is about to interrupt a task-isolated cpu. It can be helpful to > see both where the interrupting cpu is, and also an approximation > of where the cpu that is being interrupted is. The nmi_backtrace > framework allows us to discover the stack of the interrupted cpu. > > I've tested that the change works as desired on tile, and build-tested > x86, arm64, and arm. For x86 and arm64 I confirmed that the generic > cpuidle stuff as well as the architecture-specific routines are in the > new cpuidle section. For arm I just build-tested it and made sure the > generic cpuidle routines were in the new cpuidle section, but I didn't > attempt to tease apart the tangle of platform-specific idle routines > that arm has and tag them with __cpuidle. That might be more usefully > done by someone with arm platform experience in a follow-up patch. > > I have also pushed it up to kernel.org to pull if that's easier: > > git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git nmi-backtrace > > The change conflicts with Petr Mladek's NMI printk cleanup patches: > > https://lkml.kernel.org/r/1459353210-20260-1-git-send-email-pmladek@suse.com > > He has kindly offered to resolve the conflicts. > > v5: Add CPUIDLE_TEXT to the new arch/arm/kernel/vmlinux-xip.lds.S > > v4: Added some more __cpuidle functions (PeterZ, Rafael Wysocki) > Rebased to kernel v4.6-rc1 > > v3: Various improvements to the set of __cpuidle functions; > Add back in a missing section accidentally removed in modpost.c (PeterZ) > https://lkml.kernel.org/r/1458667179-19630-1-git-send-email-cmetcalf@mellanox.com > > v2: Switch to using __cpuidle tagging, switch S-O-B to Mellanox > https://lkml.kernel.org/r/1458147733-29338-1-git-send-email-cmetcalf@mellanox.com > > Chris Metcalf (4): > nmi_backtrace: add more trigger_*_cpu_backtrace() methods > nmi_backtrace: do a local dump_stack() instead of a self-NMI > arch/tile: adopt the new nmi_backtrace framework > nmi_backtrace: generate one-line reports for idle cpus > > arch/alpha/kernel/vmlinux.lds.S | 1 + > arch/arc/kernel/vmlinux.lds.S | 1 + > arch/arm/include/asm/irq.h | 4 +- > arch/arm/kernel/smp.c | 13 +------ > arch/arm/kernel/vmlinux-xip.lds.S | 1 + > arch/arm/kernel/vmlinux.lds.S | 1 + > arch/arm64/kernel/vmlinux.lds.S | 1 + > arch/arm64/mm/proc.S | 2 + > arch/avr32/kernel/vmlinux.lds.S | 1 + > arch/blackfin/kernel/vmlinux.lds.S | 1 + > arch/c6x/kernel/vmlinux.lds.S | 1 + > arch/cris/kernel/vmlinux.lds.S | 1 + > arch/frv/kernel/vmlinux.lds.S | 1 + > arch/h8300/kernel/vmlinux.lds.S | 1 + > arch/hexagon/kernel/vmlinux.lds.S | 1 + > arch/ia64/kernel/vmlinux.lds.S | 1 + > arch/m32r/kernel/vmlinux.lds.S | 1 + > arch/m68k/kernel/vmlinux-nommu.lds | 1 + > arch/m68k/kernel/vmlinux-std.lds | 1 + > arch/m68k/kernel/vmlinux-sun3.lds | 1 + > arch/metag/kernel/vmlinux.lds.S | 1 + > arch/microblaze/kernel/vmlinux.lds.S | 1 + > arch/mips/kernel/vmlinux.lds.S | 1 + > arch/mn10300/kernel/vmlinux.lds.S | 1 + > arch/nios2/kernel/vmlinux.lds.S | 1 + > arch/openrisc/kernel/vmlinux.lds.S | 1 + > arch/parisc/kernel/vmlinux.lds.S | 1 + > arch/powerpc/kernel/vmlinux.lds.S | 1 + > arch/s390/kernel/vmlinux.lds.S | 1 + > arch/score/kernel/vmlinux.lds.S | 1 + > arch/sh/kernel/vmlinux.lds.S | 1 + > arch/sparc/kernel/vmlinux.lds.S | 1 + > arch/tile/include/asm/irq.h | 4 +- > arch/tile/kernel/entry.S | 2 +- > arch/tile/kernel/pmc.c | 3 -- > arch/tile/kernel/process.c | 72 ++++++++---------------------------- > arch/tile/kernel/traps.c | 7 +++- > arch/tile/kernel/vmlinux.lds.S | 1 + > arch/um/kernel/dyn.lds.S | 1 + > arch/um/kernel/uml.lds.S | 1 + > arch/unicore32/kernel/vmlinux.lds.S | 1 + > arch/x86/include/asm/irq.h | 4 +- > arch/x86/kernel/acpi/cstate.c | 2 +- > arch/x86/kernel/apic/hw_nmi.c | 6 +-- > arch/x86/kernel/process.c | 4 +- > arch/x86/kernel/vmlinux.lds.S | 1 + > arch/xtensa/kernel/vmlinux.lds.S | 3 ++ > drivers/acpi/processor_idle.c | 5 ++- > drivers/cpuidle/driver.c | 5 ++- > drivers/idle/intel_idle.c | 4 +- > include/asm-generic/vmlinux.lds.h | 6 +++ > include/linux/cpu.h | 5 +++ > include/linux/nmi.h | 63 ++++++++++++++++++++++++------- > kernel/sched/idle.c | 13 ++++++- > lib/nmi_backtrace.c | 40 +++++++++++++------- > scripts/mod/modpost.c | 2 +- > scripts/recordmcount.c | 1 + > scripts/recordmcount.pl | 1 + > 58 files changed, 184 insertions(+), 121 deletions(-) > -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com