Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933804AbcCPRCm (ORCPT ); Wed, 16 Mar 2016 13:02:42 -0400 Received: from mail-db3on0054.outbound.protection.outlook.com ([157.55.234.54]:45344 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754185AbcCPRCi (ORCPT ); Wed, 16 Mar 2016 13:02:38 -0400 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=fail action=none header.from=mellanox.com; From: Chris Metcalf To: Peter Zijlstra , Russell King , Thomas Gleixner , Aaron Tomlin , Ingo Molnar , Andrew Morton , Daniel Thompson , , , , CC: Chris Metcalf Subject: [PATCH v2 0/4] improvements to the nmi_backtrace code Date: Wed, 16 Mar 2016 13:02:09 -0400 Message-ID: <1458147733-29338-1-git-send-email-cmetcalf@mellanox.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <20160307204317.GR6344@twins.programming.kicks-ass.net> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:12.216.194.146;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(85426001)(229853001)(15975445007)(5003940100001)(33646002)(105606002)(86362001)(107886002)(106466001)(2201001)(50986999)(42186005)(47776003)(19580405001)(87936001)(36756003)(960300001)(48376002)(1220700001)(1096002)(11100500001)(104016004)(19580395003)(4326007)(5001970100001)(2906002)(50466002)(189998001)(2950100001)(5001770100001)(92566002)(6806005)(5008740100001)(586003)(921003)(21314002)(83996005)(2101003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR05MB1685;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;AM1FFO11FD031;1:6+u7wZiN5mAforMa1lwk6KRzxAgJFtLI5K5DxmYROq4m8cDeDauYZyjk4JdwqDX/PpNbuZ4N3I7Z/WEuewZGMlNtvot/gC4C9h3cUIwawWoP7eRLSTf0E5q9Isi90mHlyOGs0u/hosCI5WS0CMwu7bynq4lsRZNl7+OYNDt/KnHunXwIEXFYCaEDE6Bbh5UFXg1rIOny/uXYWe6ReUCC9QpcYNkXDZxd0S5DQNy8/LwzpiTsRw7+YGhsbftFBDGwKkQJx88RgxRAZH97uENKxhIjPyRONcrcwji9UGuAaurgYbFBmBWm/SXEBgYA7dJmbbue8wZ+g6GidpDQNiJS+udkwppgLKgPpd///Xn9UCiqWaetEdBtg2HqCnaavIZXAU6uTQQzfwd11Nx61rz/KyBHh3u9WkBbHbRUkiYierJFm4cz0T0yQVHFdCMI0vJ/pXBm60OVaxzzpYyYAWDkLr3UAIVBYxMN/X+jY+bPZncxzSlOhqcgS4OjTDohXwDBgRToPOY2DEpQ3q1J9NK0gcnY2NkQ+WZzpJKsSB0qbZQ= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: e6c0fa12-fb62-47f7-de71-08d34dbcc145 X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1685;2:uUIAt0q9AhjZ+QmePV1KE8esNRx7yRrhOcTKvcStD0bsIrBK1H0bmVW4WT95Psde5QKIVnhZpXDCKeEoysoprCnFqeaxZPSSP/1Y10eDXYTzHjGVMv1H/we7i+zt/0X++xTaWt9xB0wpOZTVy/j5lkA/hTP4jQxdS7Uv8j+LJbN2Z67dQfkl2kbyEbDg/7rS;3:3PAhFnEvvgpacTmq5BH8HZycd51JhC4UHxqz2jKXPSo/DmJqDG5Uvnx8X5X3DVE29gjtnixHQ9BStxVXcqErgREq6SnRRRD2kx9U1IP5xPuhhXSLTtfTmZF5ihTJV4I9KLZD2vKJAGrQPgHFbObp/jBm6GiDfFkfO80GNKRW5MED0ZSUUhqhU7nQN+pzR2n0SdPzr6q4ZAIluBp60ygljVfaOVa+Ek8FMNvdh9rkMWo=;25:0TWny42ZDqWyIF/8R5UIwO+aYwOISag2Ktsze7EEXzYauUNqny7wHveRUvxBhPLBnk0QLHiGZ7q1xXQ/05HvidCOLDABY29Gpw08bhz7vM6uIC1EifJSaJyO18oUieo90AsLv3EHXJLe3wcc3v08B+RliAtYfK4IQ9OUmdphshLSXmu7N5KezgjaZ2DKoV/xQBAUs2cfBmWVyDyZD+12biPbYjil0XwJRTnaAG7d3KpOfucOZpc4/ChZhAd0cAuaVscjSd+/yYXK6h6hFs3W/XHcJh/e2SHIdnjwV5q27Vu6s6SRSvihP/vm+MPbCvjgHc4N6d9q3IebiU1syQv3rw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1685; X-MLNXRule-EZCH-Linux: Rule triggered X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1685;20:iGfAgNQJt7hARWWRbyxiT7VSRsKLZrtv/nBFZrpqpeha1kUIyJjl+AbYi0kHik3z2XGLEffak2BKmXQkMvk0gvZD1ce0vZzgWZtJsDdUBEynY/ihSM+BD2E77XAmf9FDtHxAANNDjob390mlJqz924K939NC3t1aYHWT/vgiA4JO7KBgraDxjGWSO2Yl87v7SGtSxGgcp9rLjK3ZjIDQou+6uMJbuE12cXjsevSvqYQciZz3CbKH03tA2zBwru77HZk1ve+Pf+1pRUJijdI2pxRLLZADoiE2gE0Xcrd8+T8TXTCcUXHdtyYIRxlzqyV6GA6SDEuL5dgw+zk+tGZm1kvyzw5PDu/uJMCKABchUUZ3a/Z/DXAmAkah5DcolFtdDk9SXsj8updDnUv4O0eMvlalcCbGzw6bTQu62+yAbOzn0lziO+GK5i6ZQrjchPTRZSUUjtZEGPcr7JrhMyPtjNs5S4qiZeuw1sSwQHtY3DWUrmCKQa4+buFt6G0+VuSw X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13024025)(5005006)(13018025)(13017025)(13023025)(8121501046)(13015025)(3002001)(10201501046);SRVR:DB5PR05MB1685;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1685; X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1685;4:Dc6zc6vjZJLJgEU6QQiOQn8oABba7ORI0b5WZPi1IFS8KRl60bly5RQXTqsY62vAV8dwBgPZ/JoVoa3FdNBJ2DCMqqJQ04SupwCBNZBEYLjOg8BBflIb8tF8xE8LlyGyGp2+kopfpQoMho3yXUxblwBIgc+3n39DBTOgSN9TJISaJ5khV3lBZu9EFoGUpDxXAeukeDVMe8p3QU81u5wGVS/02lp4v1sTouawxXYBZXcSXGguVFEvw0H24T/jb7MqCkbdqGVP+63y/5EUdtB1xaWI1Tgq7d0nYxRsXpkpe8zoUq0UdGlPd1I8xBQKC+ZYGl6s7gQDIC7zv4lQ3SQHKaw0tBLbmqCSBPvntqErtyt+00soS4T6vht/hjY7Tro1e2mSAST2BHPvQevdHBm1Iazs3860/Lr15s4wnmtZo2tULjLJ6RYB4/MCPeQjitqBSHAT+zdisd3Rrdd2MMXWVw== X-Forefront-PRVS: 08831F51DC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB5PR05MB1685;23:3ZG1sRiq3yv92VxnpgXWLIR3UKUXLfZ8rjIw0P8FX?= =?us-ascii?Q?5F0xj+v2Ku8KNKPvBQxY08oTAuVLO0yajaQJz35XCWFi8tDlaWFgAQDQfvnA?= =?us-ascii?Q?3G/8BLIUxApdLuxf+K27K+RsL2wDb4QyN0rlkrRoyiDkf8KUA23rsr1UyIJr?= =?us-ascii?Q?cBdcgEXozmnHCxamjmm7KyQ2wxdrpEPVfbdQcQjWieDCa8Cs7+FIpw3dX1X1?= =?us-ascii?Q?aPIWFNoxGUiXl7V1W5IqmOD68ksFaRrjZ/5iv+FJzCiEWllbhslDq3eud9fE?= =?us-ascii?Q?FwVxt5Zf5/WVSujAY4dgqK4WumKJ3ghOcBxl+805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= X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1685;5:/BAKi7VYqz0p1ZKYI0qD9FKtG5idyfPybCy6ca9I0wfdw2s1GhgaOkbelXpvuyOgzVvBfx2grOOqnrYepnnIU6tpZr8IVqYf75ClszEcPUvyNl10LBsn5T9nKBw1IiMkaA9E2HjPJkGW0YfeqQapYQ==;24:Q0U3Mx04aEs/egPzLVV4SIbAIaPrmXVI3lDhCQRqcTXSlB0kOLN+75lqFAxFA4JnVA0Nk+nfI1TBj1QsHdQ5adD89c9He9+uv/ktSzNbNLU= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2016 17:02:27.6931 (UTC) X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a652971c-7d2e-4d9b-a6a4-d149256f461b;Ip=[12.216.194.146];Helo=[ld-1.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1685 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4472 Lines: 95 >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. Version 2 of the patch series adopts the CPUIDLE_TEXT approach that I suggested in some discussion around identifying idle cpus, and that Peter Zijlstra endorsed. I renumbered the patches to put the idle-test patch last in the series (4/4) and it is the only one modified in this version of the patch series. (To be fair I did also change all the S-O-B and author lines to be mellanox.com instead of ezchip.com). 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. v1 of the series is here: https://lkml.kernel.org/r/1456782024-7122-1-git-send-email-cmetcalf@ezchip.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.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/apic/hw_nmi.c | 6 +-- arch/x86/kernel/process.c | 4 +- arch/x86/kernel/vmlinux.lds.S | 1 + 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 | 4 +- scripts/recordmcount.c | 1 + scripts/recordmcount.pl | 1 + 52 files changed, 172 insertions(+), 115 deletions(-) -- 2.7.2