David Ahern
c17af4dd96
sparc: perf: Disable pagefaults while walking userspace stacks
Page faults generated walking userspace stacks can call schedule to switch
out the task. When collecting callchains for scheduler tracepoints this
causes a deadlock as the tracepoints can be hit with the runqueue lock held:
[ 8138.159054] WARNING: CPU: 758 PID: 12488 at /opt/dahern/linux.git/arch/sparc/kernel/nmi.c:80 perfctr_irq+0x1f8/0x2b4()
[ 8138.203152] Watchdog detected hard LOCKUP on cpu 758
[ 8138.410969] CPU: 758 PID: 12488 Comm: perf Not tainted 4.0.0-rc6+ #6
[ 8138.437146] Call Trace:
[ 8138.447193] [000000000045cdd4] warn_slowpath_common+0x7c/0xa0
[ 8138.471238] [000000000045ce90] warn_slowpath_fmt+0x30/0x40
[ 8138.494189] [0000000000983e38] perfctr_irq+0x1f8/0x2b4
[ 8138.515716] [00000000004209f4] tl0_irq15+0x14/0x20
[ 8138.535791] [00000000009839ec] _raw_spin_trylock_bh+0x68/0x108
[ 8138.560180] [0000000000980018] __schedule+0xcc/0x710
[ 8138.580981] [00000000009806dc] preempt_schedule_common+0x10/0x3c
[ 8138.606082] [000000000098077c] _cond_resched+0x34/0x44
[ 8138.627603] [0000000000565990] kmem_cache_alloc_node+0x24/0x1a0
[ 8138.652345] [0000000000450b60] tsb_grow+0xac/0x488
[ 8138.672429] [0000000000985040] do_sparc64_fault+0x4dc/0x6e4
[ 8138.695736] [0000000000407c2c] sparc64_realfault_common+0x10/0x20
[ 8138.721202] [00000000006f2e24] NG4copy_from_user+0xa4/0x3c0
[ 8138.744510] [000000000044f900] perf_callchain_user+0x5c/0x6c
[ 8138.768182] [0000000000517b5c] perf_callchain+0x16c/0x19c
[ 8138.790774] [0000000000515f84] perf_prepare_sample+0x68/0x218
[ 8138.814801] ---[ end trace 42ca6294b1ff7573 ]---
As with PowerPC (b59a1bfcc240, "powerpc/perf: Disable pagefaults during
callchain stack read") disable pagefaults while walking userspace stacks.
Signed-off-by: David Ahern <david.ahern@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-25 06:01:02 -07:00
..
2014-10-20 16:20:15 +02:00
2013-07-10 13:56:10 -07:00
2014-05-18 19:01:34 -07:00
2014-05-18 19:01:27 -07:00
2014-10-20 16:20:15 +02:00
2014-05-18 19:01:30 -07:00
2014-10-20 16:20:15 +02:00
2014-10-20 16:20:15 +02:00
2014-05-18 19:01:34 -07:00
2014-09-09 15:24:10 -07:00
2014-09-09 15:24:10 -07:00
2014-05-18 19:01:29 -07:00
2014-05-18 19:01:29 -07:00
2014-09-16 18:31:31 -07:00
2014-10-18 23:03:09 -04:00
2014-01-28 23:38:23 -08:00
2015-05-31 22:15:01 -07:00
2013-07-31 19:10:04 -07:00
2014-03-07 10:06:14 -05:00
2014-10-24 09:52:49 -07:00
2015-03-19 18:54:49 -07:00
2015-03-19 18:54:49 -07:00
2014-10-24 09:52:49 -07:00
2015-04-18 12:32:59 -07:00
2015-04-18 12:32:59 -07:00
2014-09-10 14:03:28 -07:00
2014-04-29 01:12:25 -04:00
2014-10-05 16:53:40 -07:00
2014-05-18 19:01:29 -07:00
2014-05-18 19:01:34 -07:00
2013-02-06 11:04:10 -08:00
2014-05-18 19:01:34 -07:00
2014-08-26 13:45:55 -04:00
2014-10-05 16:53:40 -07:00
2015-06-24 17:49:40 -07:00
2014-09-09 16:39:10 -07:00
2014-10-20 16:20:15 +02:00
2015-05-31 22:14:05 -07:00
2015-03-19 10:17:22 -05:00
2014-04-29 01:12:27 -04:00
2014-12-11 18:51:56 -08:00
2014-05-18 19:01:29 -07:00
2015-04-22 15:42:56 -04:00
2015-02-13 21:21:42 -08:00
2014-08-26 13:45:55 -04:00
2014-04-29 01:12:27 -04:00
2014-01-28 23:38:23 -08:00
2014-10-20 16:20:15 +02:00
2014-05-18 19:01:29 -07:00
2014-11-23 13:01:45 +01:00
2014-10-20 16:20:15 +02:00
2014-10-20 16:20:15 +02:00
2014-12-14 16:10:09 -08:00
2015-04-18 12:32:59 -07:00
2014-05-18 19:01:29 -07:00
2015-05-31 22:14:40 -07:00
2015-03-12 15:04:01 -05:00
2015-03-19 18:54:49 -07:00
2015-06-25 06:01:02 -07:00
2014-10-20 16:20:15 +02:00
2014-10-20 16:20:15 +02:00
2014-05-18 19:01:27 -07:00
2015-03-19 18:54:50 -07:00
2014-05-18 19:01:31 -07:00
2013-06-13 22:12:14 +01:00
2014-05-18 19:01:29 -07:00
2014-05-18 19:01:29 -07:00
2014-04-29 01:12:26 -04:00
2014-09-23 16:21:26 -04:00
2013-11-19 10:40:00 -08:00
2013-01-21 14:33:00 -08:00
2014-04-29 01:12:25 -04:00
2015-05-31 22:15:01 -07:00
2015-02-12 18:54:12 -08:00
2015-02-12 18:54:12 -08:00
2015-02-12 18:54:12 -08:00
2014-08-06 14:41:10 -07:00
2015-04-22 15:42:56 -04:00
2014-01-28 23:38:23 -08:00
2014-01-28 23:38:23 -08:00
2015-03-01 21:33:58 -08:00
2014-04-29 01:12:25 -04:00
2014-08-26 13:45:55 -04:00
2014-02-12 16:10:45 -05:00
2013-07-14 19:36:52 -04:00
2014-09-16 17:46:44 -07:00
2014-07-21 22:27:56 -07:00
2014-05-18 19:01:31 -07:00
2014-05-18 19:01:28 -07:00
2015-03-03 14:05:48 -08:00
2014-12-13 12:42:51 -08:00
2014-05-21 12:54:42 -07:00
2014-12-13 12:42:51 -08:00
2014-12-13 12:42:51 -08:00
2014-05-18 19:01:31 -07:00
2015-04-20 10:19:03 -07:00
2014-10-20 16:20:15 +02:00
2014-01-28 23:38:23 -08:00
2014-10-24 09:52:49 -07:00
2015-04-12 21:03:21 +02:00
2015-04-12 21:03:21 +02:00
2014-10-18 23:03:09 -04:00
2014-07-21 21:37:06 -07:00
2014-06-19 07:50:07 -10:00
2014-09-30 14:40:45 -07:00
2014-09-30 14:17:08 -07:00
2015-05-31 22:15:01 -07:00
2014-04-29 01:12:25 -04:00