mirror of https://github.com/torvalds/linux.git
Since tracepoints use RCU for protection, they must not be called on
offline cpus. trace_mm_page_pcpu_drain can be called on an offline cpu
in this scenario caught by LOCKDEP:
===============================
[ INFO: suspicious RCU usage. ]
4.1.0-rc1+ #9 Not tainted
-------------------------------
include/trace/events/kmem.h:265 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
RCU used illegally from offline CPU!
rcu_scheduler_active = 1, debug_locks = 1
1 lock held by swapper/5/0:
#0: (&(&zone->lock)->rlock){..-...}, at: [<c0000000002073b0>] .free_pcppages_bulk+0x70/0x920
stack backtrace:
CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.1.0-rc1+ #9
Call Trace:
.dump_stack+0x98/0xd4 (unreliable)
.lockdep_rcu_suspicious+0x108/0x170
.free_pcppages_bulk+0x60c/0x920
.free_hot_cold_page+0x208/0x280
.destroy_context+0x90/0xd0
.__mmdrop+0x58/0x160
.idle_task_exit+0xf0/0x100
.pnv_smp_cpu_kill_self+0x58/0x2c0
.cpu_die+0x34/0x50
.arch_cpu_idle_dead+0x20/0x40
.cpu_startup_entry+0x708/0x7a0
.start_secondary+0x36c/0x3a0
start_secondary_prolog+0x10/0x14
Fix this by converting mm_page_pcpu_drain trace point into
TRACE_EVENT_CONDITION where condition is cpu_online(smp_processor_id())
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||
|---|---|---|
| .. | ||
| 9p.h | ||
| asoc.h | ||
| bcache.h | ||
| block.h | ||
| btrfs.h | ||
| clk.h | ||
| cma.h | ||
| compaction.h | ||
| context_tracking.h | ||
| ext3.h | ||
| ext4.h | ||
| f2fs.h | ||
| fence.h | ||
| filelock.h | ||
| filemap.h | ||
| gfpflags.h | ||
| gpio.h | ||
| host1x.h | ||
| hswadsp.h | ||
| i2c.h | ||
| intel-sst.h | ||
| iommu.h | ||
| ipi.h | ||
| irq.h | ||
| jbd.h | ||
| jbd2.h | ||
| kmem.h | ||
| kvm.h | ||
| libata.h | ||
| lock.h | ||
| mce.h | ||
| migrate.h | ||
| module.h | ||
| napi.h | ||
| net.h | ||
| nmi.h | ||
| oom.h | ||
| pagemap.h | ||
| power.h | ||
| power_cpu_migrate.h | ||
| printk.h | ||
| random.h | ||
| rcu.h | ||
| regulator.h | ||
| rpm.h | ||
| sched.h | ||
| scsi.h | ||
| signal.h | ||
| skb.h | ||
| sock.h | ||
| spi.h | ||
| sunrpc.h | ||
| swiotlb.h | ||
| syscalls.h | ||
| target.h | ||
| task.h | ||
| thermal.h | ||
| thp.h | ||
| timer.h | ||
| tlb.h | ||
| udp.h | ||
| v4l2.h | ||
| vmscan.h | ||
| workqueue.h | ||
| writeback.h | ||
| xen.h | ||